Closed phrichards closed 5 days ago
I'm actually noticing something similar when editing a matrix field. When I choose to edit the entry types the slideout opens and I am able to save it, but I can't drag fields into the field layout and I see this error in the console:
You should only be passing the action into CpScreenSlideout
, not the full URL to an action:
const slideout = new Craft.CpScreenSlideout('product-configurator/default');
Does that help?
That did it! I think I tried a few variations of that with the same issue and concluded that wasn't the cause, guess I missed the one I needed. Thanks!
Sweet! Did that fix the Craft.SortableCheckboxSelect
error as well? If not, can you share your plugin/module code with us, along with steps to reproduce? (support@craftcms.com)
What happened?
Description
I'm building a custom plugin and trying to render some content in a slideout with
asCpScreen()
. The slideout is triggered by a button that I added on to a Commerce product. The slideout works and my template renders, but there are console errors that imply that Craft's JS is not loaded.Script to open the slideout:
Controller action:
The template is currently just a
{{_self}}
.The slideout opens, and I can see the cancel and save buttons at the bottom, but errors in the console:
The top error for
appendBodyHtml()
was there on load, the rest popped up after clicking the save button, which also caused an indefinite spinning indicator.I can see all of Craft's JS in the sources panel, including the files where these functions are defined. Everything is fine elsewhere in the CP and on the product page, this only happens in the slideout.
Steps to reproduce
Expected behavior
Craft's JS is loaded and is not blocking custom scripts from loading.
Actual behavior
Craft's JS is missing and other scripts are not loaded.
Craft CMS version
5.5.0.1
PHP version
8.2.24
Operating system and version
Linux 6.10.11-linuxkit
Database type and version
MySQL 8.0.36
Image driver and version
Imagick 3.7.0 (ImageMagick 6.9.11-60)
Installed plugins and versions