- Issue created by @rkoller
- ๐บ๐ธUnited States brianperry
@rkoller Hate to be the person who says 'clear cache,' but did you clear the cache after enabling the module? It almost seems like some of the js needed to support this functionality isn't being loaded. Still doesn't make sense to me why this would be happening though - I'd expect the off canvas dialog to function and then functionality to be broken within the dialog if our scripts weren't available.
If we can pinpoint this, wondering if we'll need to do something during install to prevent it.
- @brianperry opened merge request.
- Status changed to Needs review
over 1 year ago 4:51pm 19 March 2023 - ๐บ๐ธUnited States brianperry
My previous 'clear cache' related comment actually seems more similar to https://www.drupal.org/project/same_page_preview/issues/3348241#comment-... ๐ The preview is showing redundant controls which should be shown in a new window instead Closed: works as designed
I've actually been able to duplicate something that feels similar to this. If I configure Drupal to not aggregate my css and js files I can see this if I reload the page and click the 'toggle preview' button quickly. If I instead give the page a little more time to load, the dialog will open as expected when I click on the toggle button. If I configure css and js to be aggregated I can't duplicate this. So that tells me that we're not doing enough to ensure our dependencies are loaded before the toggle button is interactive.
Layout builder is the area in core that I'm most familiar with that uses the off canvas dialog. They add `core/drupal.dialog.off_canvas` as an explicit dependency of their library. Adding the same dependency to our same_page_preview library seems to resolve the issue for me.
I opened an MR with this change. I'm not positive that this will resolve @rkoller's issue as what is shown in the videos feels a little different, but even if it doesn't, this seems like a worthwhile change.
-
cosmicdreams โ
committed 62cb88e1 on 1.0.x authored by
brianperry โ
Issue #3348315: Installation on already existing sites broken with no...
-
cosmicdreams โ
committed 62cb88e1 on 1.0.x authored by
brianperry โ
- ๐บ๐ธUnited States cosmicdreams Minneapolis/St. Paul
As a follow up, don't know if this is an over-optimization, perhaps we can drop the explicit core/drupal & core/jquery dependencies. core/drupal.dialog.off_canvas already brings those dependencies in.
- ๐บ๐ธUnited States cosmicdreams Minneapolis/St. Paul
@rkoller can you retest?
- ๐ฉ๐ชGermany rkoller Nรผrnberg, Germany
@brianperry if i remember correctly i cleared the cache after the install. but i've directly updated the dev version for the umami install, cleared cache and launched and the inception is gone. done the same steps for the standard install. before the update i retested, again cleared the cache, the inception persisted, updated the dev version via composer, cleared the cache again reloaded the node edit form, pressed the toggle preview button, and the inception is also gone for the other install i ran into (and those were the only two installs i ran into that inception thing). so the inception thing this issue was about seems fixed (eventhough you were uncertain if your changes would solve it :D thanks!)
the only detail that persists is ๐ The preview is showing redundant controls which should be shown in a new window instead Closed: works as designed also both installs show the redundant controls after the update now.
- Status changed to Fixed
over 1 year ago 6:29pm 19 March 2023 - ๐ฉ๐ชGermany rkoller Nรผrnberg, Germany
i'll mark the issue as fixed upon the recommendation by @cosmicdreams on slack. as noted in #8 the changes fixed the inception style for both sites i was running into the issue.
- ๐บ๐ธUnited States brianperry
As a follow up, don't know if this is an over-optimization, perhaps we can drop the explicit core/drupal & core/jquery dependencies. core/drupal.dialog.off_canvas already brings those dependencies in.
I think we can remove core/drupal, but given the state of jQuery and Drupal I think it would be safest to keep that one. Very unlikely, but possible that off canvas could remove the jQuery dependency before we do. Keeping that dependency would protect us from that.
- ๐บ๐ธUnited States brianperry
Excited that this fixed the original issue reported here.
Also created https://www.drupal.org/project/same_page_preview/issues/3348950 ๐ Remove Explicit core/drupal Dependency from same_page_preview library Fixed to track the comment in #6
- Status changed to Fixed
over 1 year ago 1:33pm 21 March 2023