Javascript error on some node-creation dialogues after 2.2 update

On some places when using the button to create a content element from inside the page-template i get the following javascript error and the creation dialogue is empty:

When accessing the node-creation dialogue from the left sidepanel (where the nodetree is located) everything works.

Some places inside the page the node-creation dialogue also works though.

As far as i know everything worked before the 2.2 update.

I tested a bit more and noticed this javascript error only happens when trying to access the node creation dialogue on the top most content collection. (like “main” of the site template)

And i also noticed it only happens when somewhere on the page sits a “Insert content reference” element.

I tried this on 2 other sites after i updated them to Neos 2.2.2 but could not reproduce it.
I have no idea why it only happens on this specific neos page. i checked and the Insert content reference element was not modified by me.

Not related to the insert reference element I have the issue randomly … impossible to reproduce unfortunately

I’m sure that you can invertedly reproduce this error by adding rel=“typo3:content-collection” attribute to the wrapping html container. The error also will disapear if you let your nodetype inherit from neos content collection prototype.

i am 100% sure it is triggered here by the Insert content reference element.

What i tried:

  1. create new empty page.
  2. Add Headline with some text.
  3. reload page
  4. click on Headline and try to add an element under the headline = works.
  5. add a content reference element somewhere. Didnt selected any element to reference. so it still displays “No references selected”
  6. reload page and try 4 again. = does no longer work. element creation dialogue is empty and i get the javascript error like in the screenshot above.

I will try it again in a empty neos install with same page package. If the issue is there too it has to do something with the page package, but no idea what as i didn’t do anything with the content reference element and definetly didn’t add rel=“typo3:content-collection”

If the issue happens in the container too i can provide that container to someone who might have more experience in what is going wrong there.

forgot to mention that it seems the headline has to be in the topmost content collection. if i add a multi column element and add the headline there it works even with a content reference element.

Hi. I got the exact same issue now again on the live-server with a different project, but this time i am not using any reference-elements.

I would really appreciate if anyone could enlighten me what i am doing wrong and how to prevent this?

I have the exact same site-package on my test-server where it works without issues, so my guess is that it is either the server itself or some content on the page which i would need to identify.

Sorry to post so much about this, but i have no good idea what is going wrong here.

I copied the whole Database from the Live-Server (mittwald hosting) to my container, including all resources. (the package is the same anyway) But i still could not reproduce it in my container.

Now i noticed the following exception from the live-server:

Now the only property arrays are in the page nodetype. two array<TYPO3\Media\Domain\Model\Asset>. one for images, the other one for html5 video. (but both are configured the same) and both where empty.

Now i just put 1 image and 1 video into the asset property, and tested again. And see there, it worked again.

Now i removed the elements again and it still works.

Not sure how and why it stopped working, but that fixed it.