Skip to content

Conversation

@fbomateus
Copy link

Summary

This Pull Request fixes the synchronization of the publication state of remote videos with their parent landing_page node. The changes ensure that when a node is unpublished, all associated videos are also unpublished, and when the node is published, the individual video states are respected as configured.

Changes

  • Module Configuration:

    • Added zoocha_video_sync.info.yml to define module metadata and dependencies.
    • Configured zoocha_video_sync.services.yml to define and manage the video publishing service.
  • Service Implementation:

    • VideoPublishingService.php: Implements logic to synchronize video publication status with the parent node's state.
    • Includes error handling and logging for debugging and monitoring.
  • Hook Implementation:

    • zoocha_video_sync.module: Uses hook_entity_presave to trigger video synchronization logic whenever a landing_page node is saved.

Testing

  • Confirm that when a landing_page node is unpublished, all associated videos are automatically unpublished.
  • Verify that when a node is published, the video states are individually respected according to their configured settings.

Notes

  • This fix addresses previous issues with video state management and ensures compliance with Drupal best practices for modularity and dependency management.
  • Logs have been included for key actions to aid in troubleshooting and verification of functionality.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant