Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Video Publication State Synchronization for Landing Page Content #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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