Page Manager does not expand variants when BigPipe is enabled. Use context in Drupal.behaviors.pageManagerVariantsAdmin to make the events work correctly and be compatible with BigPipe.

Please review the proposed patch.

Issue relates to both 8.x-4.x and 8.x-1.x.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexrayu created an issue. See original summary.

Status: Needs review » Needs work

The last submitted patch, context_issue.patch, failed testing. View results

DamienMcKenna’s picture

Given that BigPipe is now enabled automatically in 8.5.x, this needs to be resolved soon.

alexrayu’s picture

Not sure why the tests fail. Seems unrelated to adding the context. Any ideas?

abramm’s picture

Status: Needs work » Needs review
FileSize
1.34 KB

Not only context, once() is missing as well. Here's the patch.

Status: Needs review » Needs work
abramm’s picture

The last non-failing test run was at Aug 2017 and none of the tests provides JS and/or browser tests, so ignoring test resutls should be safe.

abramm’s picture

Status: Needs work » Needs review
zahord’s picture

Hi, seems duplicated, the same was reported there https://www.drupal.org/project/page_manager/issues/2951961

andypost’s picture

abramm’s picture

TODO: Check if jquery once library is included as dependency.

andypost’s picture

Status: Needs review » Needs work
zahord’s picture

FileSize
1.71 KB

Patch to add dependence for jquery once, Thanks @abramm for the review in the other thread.

zahord’s picture

Status: Needs work » Needs review
andypost’s picture

Status: Needs review » Needs work
+++ b/page_manager_ui/page_manager_ui.libraries.yml
@@ -12,3 +12,4 @@ page_variants:
     - core/jquery
+    - core/jquery.once

later depends on jquery, so jquery should be removed)

zahord’s picture

FileSize
1.72 KB
386 bytes

Updated!

zahord’s picture

FileSize
386 bytes
zahord’s picture

Status: Needs work » Needs review
webdrips’s picture

#16 works for me thanks.

abramm’s picture

Status: Needs review » Reviewed & tested by the community

I've been using #16 for a month without any issues.

nevergone’s picture

#16 tested and works well! :)

meickol’s picture

#16 works for me, please commit this.
Drupal version: 8.5.3

DamienMcKenna’s picture

Bump.

krith_18’s picture

FileSize
66.18 KB
266.89 KB

Hi,

I got this issue in drupal 8.5.3(current version).
When you select edit of your respective page,the sub menu of the variants are not seen.I have attached a screenshot of it.
I inspected the element and found that (display:none) has been given for the ul element (please see screenshot).
So, commenting that class worked for me.

File path: page_manager->page_manager_ui->css->page-manager-ui-page-variants.css
(Line number 6)
Styling:
.page-manager-wizard-tree .page__section__2 {
display: none;
}

I commented the above styling and it worked for me.

abramm’s picture

Hi @krith_18,

What you see is symptoms of JS behavior issue.
The patch at #5/#16 (which is essentially the same) is intended to fix this issue. Just apply and clear your caches.
Please let me know if this helps.

krith_18’s picture

Hi @abramm,

I tried applying patch #5 and #16 but it is not working for me.
Is removing display:none a wrong way of doing?

Thanks in advance!

Christopher Riley’s picture

16 works perfectly for me. +1 RTBC

millionleaves’s picture

#16 works for me too. +1 RTBC.

markdc’s picture

Hate to rain on the RTBC, but the patch isn't working for me on 8.5.6. I tried both the latest dev and beta versions. If I turn BigPipe off, Variants open again; so it is the same problem/solution.

markdc’s picture

Status: Reviewed & tested by the community » Needs work
millionleaves’s picture

I'm running 8.5.6 with Page Manager 8.x-4.0-beta3, plus this patch and two additional patches:

https://www.drupal.org/project/page_manager/issues/2458563#comment-12000506
https://www.drupal.org/project/page_manager/issues/2858877#comment-12660287

BigPipe is enabled, and my variants are functioning correctly.

I wonder how your setup is different?

markdc’s picture

Thank you for your setup info. I have no other patches for Page Manager applied. I'll troubleshoot this further if I have time.

One thing I know for sure: it's not just BigPipe. When I first started using Page Manager I didn't have this problem, and BigPipe has always been enabled in my setup. Something else is causing the issue and turning BigPipe off just happens to fix it.

abramm’s picture

Hi @fatmarker,

You may be seeing some other JS issue caused by BigPipe, not necessary this one. Try checking your browser JS console.

Could you please try reproducing the issue with a patch applied on a clean Drupal install (simplytest.me is an option)?
If it reproduces, please post exact steps to reproduce so someone else could check it as well.
If it not reproduces with clean install, there's something else specific for your installation. In this case, please change this issue status back to RTBC.

Thanks!

markdc’s picture

Status: Needs work » Reviewed & tested by the community

Patch works. Sorry for all the hoopla... =[

So strange. After patching I cleared the cache multiple times — didn't work. Rolled back a bunch of composer updates and 1 module updated from this morning (clearing cache in between) — still didn't work. Then started upgrading things again one by one, and it suddenly started working. I think I just needed to clear the cache 10 more times. Sorry!!

What confuses me the most is that I didn't have this variants issue or a need for this patch a few weeks ago, and BigPipe has always been enabled.

Prez13’s picture

Version: 8.x-4.x-dev » 8.x-4.0-beta3
Status: Reviewed & tested by the community » Active

Hi,

I have page manager 8.x-4.0-beta3 on drupal 8.5.6. When trying to add/edit or delete blocks nothing is happening and it is the same when I try to delete the variant on the "general" tab.

I can see the following errors in the Safari console:
[Error] TypeError: undefined is not a function (near '...a.widget...')
(fonction anonyme) (Élément de script 1:4:172)
(fonction anonyme) (Élément de script 1:4:135)
Code général (Élément de script 1:4:144)
appendChild
p (jquery.min.js:2:535)
globalEval (jquery.min.js:2:2583)
text script (jquery.min.js:4:17047)
Qb (jquery.min.js:4:10178)
A (jquery.min.js:4:13722)
(fonction anonyme) (jquery.min.js:4:16325)
send
send (jquery.min.js:4:16675)
ajax (jquery.min.js:4:13507)
Ja (jquery.min.js:3:15822)
insert (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:130)
(fonction anonyme) (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:121:295)
forEach
success (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:121:186)
success (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:105)
i (jquery.min.js:2:28023)
fireWith (jquery.min.js:2:28785)
A (jquery.min.js:4:14047)
(fonction anonyme) (jquery.min.js:4:16325)
[Error] TypeError: undefined is not a function (near '...a.widget...')
(fonction anonyme) (Élément de script 2:4:182)
(fonction anonyme) (Élément de script 2:4:145)
Code général (Élément de script 2:4:154)
appendChild
p (jquery.min.js:2:535)
globalEval (jquery.min.js:2:2583)
text script (jquery.min.js:4:17047)
Qb (jquery.min.js:4:10178)
A (jquery.min.js:4:13722)
(fonction anonyme) (jquery.min.js:4:16325)
send
send (jquery.min.js:4:16675)
ajax (jquery.min.js:4:13507)
Ja (jquery.min.js:3:15822)
insert (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:130)
(fonction anonyme) (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:121:295)
forEach
success (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:121:186)
success (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:105)
i (jquery.min.js:2:28023)
fireWith (jquery.min.js:2:28785)
A (jquery.min.js:4:14047)
(fonction anonyme) (jquery.min.js:4:16325)
[Error] TypeError: undefined is not a function (near '...$.widget...')
(fonction anonyme) (Élément de script 3:7)
Code général (Élément de script 3:8:182)
appendChild
p (jquery.min.js:2:535)
globalEval (jquery.min.js:2:2583)
text script (jquery.min.js:4:17047)
Qb (jquery.min.js:4:10178)
A (jquery.min.js:4:13722)
(fonction anonyme) (jquery.min.js:4:16325)
send
send (jquery.min.js:4:16675)
ajax (jquery.min.js:4:13507)
Ja (jquery.min.js:3:15822)
insert (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:130)
(fonction anonyme) (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:121:295)
forEach
success (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:121:186)
success (js_rlKs-XcNqAu9EFy1vVfPA1k_Kymrz1mGRfwkizcRku0.js:105)
i (jquery.min.js:2:28023)
fireWith (jquery.min.js:2:28785)
A (jquery.min.js:4:14047)
(fonction anonyme) (jquery.min.js:4:16325)

I have installed the 2921404-16.patch but nothing better...

Thanks in advance,

andypost’s picture

Version: 8.x-4.0-beta3 » 8.x-4.x-dev
Status: Active » Reviewed & tested by the community

@Prez13 please file separate issue for Safari, this one about different bug

andypost’s picture

daggerhart’s picture

Tested and works.

yepa’s picture

tested & it works ;)

huzooka’s picture

What do we need here to get this committed?

Denes.Szabo’s picture

#16 tested and works.

Vincent_Jo’s picture

Hi,
none of the provided patches worked for me.
Commenting out

.page-manager-wizard-tree .page__section__2 {
  display: none;

from #24
worked!

thanks
Vincent

NWOM’s picture

#16 worked for me as well. Thank you everyone!

hdbonnett’s picture

Patch in #16 resolved this issue for me on 8.6.7 with 8.x-4.0-beta3

aleksip’s picture

#16 tested and works.

knyshuk.vova’s picture

The patch #16 looks good and applies successfully. +1 for RTBC.

knyshuk.vova’s picture

The patch #16 looks good and applies successfully. +1 for RTBC.

manuel.adan’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
2.3 KB
461 bytes

It works, but aggregated JavaScript files has to be regenerated to take the changes, added cache clearing on post update.

  • manuel.adan committed b2c5d9a on 8.x-4.x
    Issue #2921404 by zahord, alexrayu, manuel.adan, abramm, krith_18: Use...
manuel.adan’s picture

Status: Needs review » Fixed

Committed, thanks to everyone!

Status: Fixed » Closed (fixed)

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

Orkut Murat Yılmaz’s picture

Problem still exists with Drupal 8.8.2.