Problem/Motivation

When using cookies_video in conjunction with ajax views placed via layout builder, the overlays of the iframes are not generated after ajax-content from drupals views is injected. Also, when consent was given, the iframes do not update their attributes to start working.

Steps to reproduce

* Configure cookies_video to block videos
* Create a view with video media, pagination and ajax enabled.
* Place it on a page with layout builder
* Use pagination
* The iframes will be broken on page 2 and on and no overlay will be generated for asking for consent.

Proposed resolution

Trigger the same event ("cookiesjsrUserConsent") as CookiesJSR manually with the current consent state, when drupal does inject ajax content.

Remaining tasks

Review issue and provided MR.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork cookies-3444386

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

fisherman90 created an issue. See original summary.

fisherman90’s picture

Assigned: fisherman90 » Unassigned
Status: Active » Needs review
fisherman90’s picture

Issue summary: View changes
fisherman90’s picture

tobiasb’s picture

Status: Needs review » Reviewed & tested by the community

The fix on production https://dgap.org/en/mediacenter -> change filter (media type) to video.

anybody’s picture

Thanks for the report and the fix. I'm not super happy with the implementation above document.dispatchEvent().
I don't have much time currently to think about that. Any ideas for a more straight-forward solution?