[SOLVED] WYSIWYG editor broken with schema containing an array with rich text

I’m submitting a…

  • [x ] Bug report

Current behavior

I created a schema with an array containing a text field AAA for which I set the editor to RichText. In the content tab, I added three objects to the array. For each object, I inserted some HTML p-tags for AAA.
Upon retrieving the content via the ClientLibrary with autogenerated classes, I noticed that only AAA of the first object contains the p tags. The second and the third object only have one p tag which was omited from the ClientLibrary. When looking at the API reponse with Fiddler, the p tags from the second and third object are missing as well. I’m 100% positive that I once had the p tags in the editor when using the source control view of the WYSIWYG editor. So this seems to be the first bug.

Second bug: Upon trying to recheck my HTML in the cloud admin panel, only the first WYSIWYG editor (for the first object) is loaded now. The editors for the second and third object are not loading. The console shows this error:

app.js?c40dc12bf750c7c3087a:2 ERROR TypeError: Cannot read property 'setAttribute' of undefined
    at i.aria (theme.min.js:1)
    at i.postRender (theme.min.js:1)
    at i.postRender (theme.min.js:1)
    at i.postRender (tinymce.min.js:2)
    at i.postRender (theme.min.js:1)
    at i.postRender (tinymce.min.js:2)
    at i. (theme.min.js:1)
    at Object.jt [as each] (tinymce.min.js:2)
    at i.each (theme.min.js:1)
    at i.exec (theme.min.js:1)

Sometimes I see this error too.

app.js?c40dc12bf750c7c3087a:2 ERROR Error: Cannot find control with name: 'isUnique'
    at ie (app.js?c40dc12bf750c7c3087a:2)
    at ee (app.js?c40dc12bf750c7c3087a:2)
    at t.addControl (app.js?c40dc12bf750c7c3087a:2)
    at t._setUpControl (app.js?c40dc12bf750c7c3087a:2)
    at t.ngOnChanges (app.js?c40dc12bf750c7c3087a:2)
    at t.e.type.ngOnChanges.e.onChanges (app.js?c40dc12bf750c7c3087a:2)
    at wn (app.js?c40dc12bf750c7c3087a:2)
    at bn (app.js?c40dc12bf750c7c3087a:2)
    at vn (app.js?c40dc12bf750c7c3087a:2)
    at co (app.js?c40dc12bf750c7c3087a:2)

@Sebastian Can you take a closer look please? :wink:

I suppose there is something wrong with unique ids? Or I broke something with my HTML content :thinking:

Expected behavior

  • The API should return the p tags of property AAA of the second and third item. Right now it only returns the inner HTML.
  • The WYSIWYG editor should work for all object, not just the first.

Minimal reproduction of the problem

https://cloud.squidex.io/app/XXX/content/about-us/4ee8184e-8c1e-4ee4-acc5-a1ccbcfd3a41

Environment

  • [x] Cloud version

Browser:

  • [x] Chrome (desktop)

Others:
reproducible on other computer with same Chrome version

Can you send me your schema?

Sure. https://pastecode.xyz/view/b238e68f

I cannot reproduce it. I have fixed the isUnique problem, but it was not causing any issues.

If you like, you can take a look at the live schema / content in my account.

Using Firefox, I also see this error message:

ERROR TypeError: "i is undefined"
https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.4/themes/modern/theme.min.js:1
...

Looking at https://www.tiny.cloud/docs/changelog/, I see that the TinyMCE developers made a lot of changes since 4.9.4. Maybe it’s best to just upgrade to the latest version? :thinking:

What is your app name again?

The app is called malask-de

Hi, Just an update. I am working on this, but there is a bug in external library that prevents the deployment. So I either have to wait if they provide a hotfix or I have to rollback this other change.

Hi, I have updated the editor.

Thanks! It’s working now

1 Like