xmlhttprequest.responseJSON is undefined

Created on 18 November 2024, 30 days ago

Problem/Motivation

I'm upgrading to Drupal 10 and I've been using page manager and panels IPE. I installed Layout Builder IPE as a suitable replacement for panels IPE but having difficulty getting it to work. When I click on the "Customize" button in the tray a small spinner next to the button loads but nothing ever happens, hence preventing me from adding content. The console shows an error "xmlhttprequest.responseJSON is undefined" on line 82 of "ipe.js?v=10.3.6:82" and watchdog shows error "InvalidArgumentException: The "page_variant" entity storage is not supported in Drupal\layout_builder\Entity\LayoutBuilderSampleEntityGenerator->get() (line 52 of /var/www/html/web/core/modules/layout_builder/src/Entity/LayoutBuilderSampleEntityGenerator.php)." Not sure if the former error is a merely a result of the latter but it could be. I haven't found any other reports of this error or patches.

Steps to reproduce

Open any page manager page. Then click on the "Customize" button that is shown in the tray.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States cybercoda

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cybercoda
  • πŸ‡©πŸ‡ͺGermany berliner

    I can reproduce the problem. Will have a look at it.

  • πŸ‡©πŸ‡ͺGermany berliner

    Can you try with the dev version of this module please? I think your issue is fixed by https://git.drupalcode.org/project/layout_builder_ipe/-/commit/001cdcce5... which isn't yet in the tagged release.

  • πŸ‡©πŸ‡ͺGermany berliner

    I have just tagged a new release 1.0.0-beta10.
    Please test with that and let me know if that solves your issue.

  • πŸ‡ΊπŸ‡ΈUnited States cybercoda

    Quick update on this. I rolled back my Drupal from version 10.3 to version 9.5.11 since my D10 install has a lot more unrelated issues which is muddying the water. I installed ^1.0@beta' on my Drupal 9.5.11 install and I'm still experiencing a similar issue but I'm no longer receiving any errors. When I click on the customize button I see a spinner for a brief second and then the page jumps to the top, as if it triggers a jQuery "scrollToTop", but the UI never loads. This test was perform on freshly created Page Manager page using Layout Builder as a variant which had never previously used Panels IPE variant, hence avoiding any kind of potential conflicts. Once again, I see no error in console, no error in watchdog, and no php errors in php log so I'm not sure where this issue is stemming from. Note that console does indeed show a successful post/response status 200 upon clicking the customize button. Issue seems specifically related to the UI. I will start to dive deeper into my theme to see if there is something conflicting the action. It's also worth noting that this Drupal 9.5.11 install is using Bootstrap 3.

  • πŸ‡©πŸ‡ͺGermany berliner

    Can you have a look at the value of drupalSettings.layout_builder_ipe.entity_selector in your browser console. This variable should contain a CSS selector, and that selector should exist on the page. There might indeed be issues with the theme, but it's hard to tell from the distance.

  • πŸ‡ΊπŸ‡ΈUnited States cybercoda

    @berliner. I don't see drupalSettings.layout_builder_ipe.entity_selector in the browser console. We I set the Claro 9.5.11 theme as default the default theme, in place of our custom Bootstrap 3 theme, the IPE works as intended. Hence, I do believe the issue is stemming from something related to our custom Bootstrap 3 theme.

  • πŸ‡ΊπŸ‡ΈUnited States cybercoda

    Quick update on this. Using Drupal 9.5.11 with theme Seven 1.0.0 the Layout Builder IPE works without issue. But when we set our custom theme as default which is built on Bootstrap 3 for Drupal (SASS) 8.x-3.32 I experience the issue noted above. To troubleshoot our custom theme I've been removing custom CSS and custom JavaScript little by little in an effort to find what is causing this issue but after removing all of our custom JS and custom CSS we are still experiencing the same issue which leads me to believe the conflict is with Bootstrap 3. Does anyone know if the Layout Builder IPE is compatible with Bootstrap 3 or if there are perhaps specific Bootstrap 3 JavaScript components, such as modal.js, that conflicts with Layout Builder IPE?

    Bootstrap 8.x-3.32
    Built to use Bootstrap, a sleek, intuitive, and powerful front-end framework for faster and easier web development.
    Requires: jQuery UIjQuery UI DraggablejQuery UI Resizable

  • πŸ‡ΊπŸ‡ΈUnited States cybercoda

    Because I suspect Layout Builder IPE has conflicts with Bootstrap 3 I upgraded to Drupal 10.3 again which is using Bootstrap 5 where I seem to be having more luck since clicking on "Customize" loads the layout builder. But when clicking on "Save" or "Discard" I receive a ajax error.

    An error occurred while attempting to process /layout-builder-ipe/page_manager/edit/page_manager/ryan_test_page2-layout_builder-0?current_path=/ryan-test-page2&_wrapper_format=drupal_ajax: ajax.$form.ajaxSubmit is not a function

  • πŸ‡ΊπŸ‡ΈUnited States cybercoda

    Feel free to close this ticket as I was able to resolve this issue after upgrading to Bootstrap 5

  • πŸ‡ΊπŸ‡ΈUnited States cybercoda
Production build 0.71.5 2024