Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: jQuery container errors and interactions disabled (starting from v4.11.0) #15763

Closed
7ochem opened this issue Sep 19, 2024 · 3 comments
Closed

Comments

@7ochem
Copy link

7ochem commented Sep 19, 2024

What happened?

Description

I was on Craft v4.9.7 and updated to 4.12.3 (latest). I did a full Composer update. Then most (javascript) interactions did not work anymore, such as adding blocks to a matrix, the checkbox on existing blocks in a matrix, deleting blocks in a matrix and the view button (it's gone).

Up until 4.10.8 (latest 4.10.x) I have no issues.

When I update to 4.11.0 I get this error in my console:

jQuery.Deferred exception: containerId is not defined ReferenceError: containerId is not defined
    at s.constructor.init (/cpresources/b027c19e/garnish.js?v=1726751436:2:22615)
    at s.constructor.constructor (/cpresources/b027c19e/garnish.js?v=1726751436:2:2989)
    at s.constructor (/cpresources/b027c19e/garnish.js?v=1726751436:2:1243)
    at new s.constructor (/cpresources/b027c19e/garnish.js?v=1726751436:2:1243)
    at s.constructor.initTabs (/cpresources/936d184d/neo-main.js?v=1724422465:1:29033)
    at s.constructor.initUi (/cpresources/936d184d/neo-main.js?v=1724422465:1:26379)
    at HTMLDivElement.<anonymous> (/cpresources/936d184d/neo-main.js?v=1724422465:1:60857)
    at Function.each (/cpresources/cb66c37/jquery.js?v=1726751436:2:3002)
    at w.fn.init.each (/cpresources/cb66c37/jquery.js?v=1726751436:2:1482)
    at s.constructor.init (/cpresources/936d184d/neo-main.js?v=1724422465:1:60352) undefined

jquery.js?v=1726751436:2 Uncaught ReferenceError: containerId is not defined
    at s.constructor.init (DisclosureMenu.js:50:26)
    at s.constructor.constructor (Base.js:20:15)
    at s.constructor (Base.js:32:21)
    at new s.constructor (Base.js:32:21)
    at s.constructor.initTabs (Block.js:448:58)
    at s.constructor.initUi (Block.js:348:10)
    at HTMLDivElement.<anonymous> (Input.js:217:13)
    at Function.each (jquery.js?v=1726751436:2:3002)
    at w.fn.init.each (jquery.js?v=1726751436:2:1482)
    at s.constructor.init (Input.js:193:45)

Starting from 4.11.1 up until 4.12.3 the error is as follows:

Uncaught No disclosure container found.
Full trace from console:
(anonymous) @ jquery.js?v=1726752620:2
setTimeout
w.readyException @ jquery.js?v=1726752620:2
(anonymous) @ jquery.js?v=1726752620:2
l @ jquery.js?v=1726752620:2
c @ jquery.js?v=1726752620:2
setTimeout
(anonymous) @ jquery.js?v=1726752620:2
u @ jquery.js?v=1726752620:2
fireWith @ jquery.js?v=1726752620:2
fire @ jquery.js?v=1726752620:2
u @ jquery.js?v=1726752620:2
fireWith @ jquery.js?v=1726752620:2
c @ jquery.js?v=1726752620:2
setTimeout
(anonymous) @ jquery.js?v=1726752620:2
u @ jquery.js?v=1726752620:2
fireWith @ jquery.js?v=1726752620:2
fire @ jquery.js?v=1726752620:2
u @ jquery.js?v=1726752620:2
fireWith @ jquery.js?v=1726752620:2
ready @ jquery.js?v=1726752620:2
$ @ jquery.js?v=1726752620:2

Googling that exact error gave me one result, this issue here #15543. Maybe it is related. This issue was reported in Craft CMS v5 and I have a similar error in v4.

Steps to reproduce

I have Craft CMS 4 installed with some additional plugins, see additional info.

Expected behavior

No javascript errors and working interactions.

Actual behavior

Broken javascript.

Craft CMS version

4.11.0

PHP version

8.3

Operating system and version

Docker php:8.3-fpm image locally. Linux Debian 11 on server.

Database type and version

MariaDB 10.5 / MySQL 8.0

Image driver and version

?

Installed plugins and versions

  • carlcs/craft-diywidget 3.0.0
  • craftcms/cms 4.11.1
  • craftcms/element-api 3.0.1.1
  • craftcms/feed-me 5.3.0
  • craftcms/redactor 3.0.4
  • craftsnippets/craft-quick-filters 2.3.2
  • doublesecretagency/craft-cpcss 2.6.0
  • ether/logs 4.0.0
  • ether/seo 4.2.1
  • ether/simplemap 4.0.4
  • jamesedmonston/graphql-authentication 2.5.0
  • nystudio107/craft-retour 4.1.14
  • spicyweb/craft-neo 3.9.11
  • verbb/formie 2.0.44.1
  • wrav/oembed 2.3.2
@7ochem
Copy link
Author

7ochem commented Sep 19, 2024

As a temporary solution I added a conflict rule to my composer.json:

  "conflict": {
    "craftcms/cms": ">=4.11.0,<=4.12.3"
  }

This way I could do a full composer update to get all other packages to the latest versions with Craft CMS v4.10.8.

@ttempleton
Copy link

This error is coming from Neo and should be fixed in the newest versions for Craft 4 (I think 4.2.10 was where it was fixed).

@7ochem
Copy link
Author

7ochem commented Sep 24, 2024

I updated (upgraded) Neo from v3 to v4 without any hassle and updated Craft CMS to the latest version (4.12.3) and everything seems to work nicely without anything breaking and causing errors 🎉

Thanks you @ttempleton!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants