When logged in as admin, I sometimes get duplicate collapsers (the +/- things you click on). It's because the attach code is being run twice. Once as normal, and another time as part of an AJAX thing.

The attached patch works, but it paints over the problem of duplicate attach calls. I don't know why it happens.

Comments

mathieso created an issue. See original summary.

stephen ollman’s picture

I can confirm this issue started after the latest update.

Patch also fixes the issue for me too.

Thanks!

rooby’s picture

Status: Needs review » Needs work

This solution will break things if views trees were added using ajax. In that case the trees would not be processed.

It would be better to use jQuery.once

rooby’s picture

Here is a D7 patch that fixes it.

Leaving as needs work since it is still a d8 issue for now.

Mykola Antoshchuk’s picture

Here is a D8 patch.

alphawebgroup’s picture

Assigned: mathieso » Unassigned
Status: Needs work » Needs review
wombatbuddy’s picture

Confirm that the patch #5 fixed the issue
(also, the clearing of the browser's cache was needed).

mradcliffe’s picture

StatusFileSize
new599 bytes
new1.46 KB

Missing jquery dependency - #2793823: Missing jQuery and jquery.once dependencies patch conflicts with this one. I'm uploading #5 but without the libraries.yml change so that both patches can be applied without conflicts.

I removed the double wrapped jQuery call as #2798323: Make provider prefix to username optional should solve that.

I also fixed the patch file to be a git diff rather than using diff.

gaurav.kapoor’s picture

#8 resolves the issue of the duplicate of collapsers and also produces a cleaner UI.

  • mradcliffe authored df45b8b on 8.x-2.x
    Issue #2793863 by mradcliffe, rooby, mathieso, Mykola Antoshchuk:...
gaurav.kapoor’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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