Skip to content

Uncaught TypeError: Craft.MatrixInput is not a constructor and similar #793

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

Closed
superflausch opened this issue Sep 27, 2023 · 1 comment
Closed

Comments

@superflausch
Copy link

superflausch commented Sep 27, 2023

Bug Description

Recently we get JS errors on different fields as soon as they are added to an newly created entry (doesn't seem to affect existing entries). Those field are nested in a NEO field.

I first thought this is a Craft issue related to a newer update and reported it there. But per Brandon's comment/commit this is more likely a NEO issue. Original issue is #13752.

Here are some examples:

VM4487:376 Uncaught TypeError: Craft.MatrixInput is not a constructor
    at <anonymous>:376:19
    at m (jquery.js?v=1695796812:2:867)
    at Pe (jquery.js?v=1695796812:2:48869)
    at w.fn.init.append (jquery.js?v=1695796812:2:50073)
    at s.constructor.initUi (Block.js:342:18)
    at s.constructor.addBlock (Input.js:314:11)
    at e (Input.js:1110:12)
    at Input.js:1149:9
VM4506:60 Uncaught ReferenceError: CKEditor5 is not defined
    at <anonymous>:60:3
    at <anonymous>:61:3
    at m (jquery.js?v=1695796812:2:867)
    at Pe (jquery.js?v=1695796812:2:48869)
    at w.fn.init.append (jquery.js?v=1695796812:2:50073)
    at s.constructor.initUi (Block.js:342:18)
    at s.constructor.addBlock (Input.js:314:11)
    at e (Input.js:1110:12)
    at Input.js:1149:9

The errors prevent some fields to work properly. After saving the entry, it can be edited without an issue and without those errors.

This happens on multiple sites which share a similar setup with a NEO field. But seems to be isolated to sites running NEO versions after 3.8.6 (and also Craft versions newer than 4.5.3). Or in other words a site running Craft 4.5.3 and NEO 3.8.6 sharing the same field etc. setup is working without this issue.

Steps to reproduce

  1. Create a new entry (which uses this field setup)
  2. Add a new or multiple blocks
  3. Console throws those errors, some field don't work properly

Expected behaviour

No errors, fields work properly

Neo version

3.9.3

Craft CMS version

4.5.6

What is the affected Neo field's propagation method?

No response

Does this issue involve templating, and if so, is eager-loading used?

No.

@ttempleton
Copy link
Contributor

Duplicate of #790

@ttempleton ttempleton marked this as a duplicate of #790 Sep 27, 2023
@ttempleton ttempleton closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
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

2 participants