Popup appears multiple times when using AJAX. Related to #1658722: Doubled popups on pages which have ajax loaded elements..

I think in the D8 port (#2643350: EU Cookie Compliance - 8.x-1.0-beta4), this part was removed because syntax change in jQuery Once 2.x. Patch coming.

CommentFileSizeAuthor
#2 2741837-cookie-ajax-1.patch3.75 KBjcisio

Comments

jcisio created an issue. See original summary.

jcisio’s picture

Status: Active » Needs review
StatusFileSize
new3.75 KB

Following patch keeps the same variable name "sliding-popup". But to be future-proof, I think we need to prefix it with the module name, in all branches. So I don't include it in this patch.

Status: Needs review » Needs work

The last submitted patch, 2: 2741837-cookie-ajax-1.patch, failed testing.

The last submitted patch, 2: 2741837-cookie-ajax-1.patch, failed testing.

The last submitted patch, 2: 2741837-cookie-ajax-1.patch, failed testing.

jcisio’s picture

There is no tests, and it made Drupal CI failed. I won't change issue status. Can someone just disable test on the D8 please?

killua99’s picture

Perhaps ".once('sliding-popup').each(function () {" is the only way to be sure we include only once the sliding popup.

Would you mind to take a look at this issue after I commit this patch?

The issue is: https://www.drupal.org/node/2692803

It need a reroll patch but I have more time to read and review than actually make again the patch.

jcisio’s picture

There is only one line change. The indentations on one more nesting level make the patch big. There is no problem rerolling either patch.

  • killua99 committed c5a1bb6 on 8.x-1.x authored by jcisio
    Issue #2741837 by jcisio: Doubled popups on pages which have ajax loaded...
killua99’s picture

Status: Needs work » Fixed

Now is on the branch.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.