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

Uncaught (in promise) TypeError: i.includes is not a function when adding a block #16055

Closed
angelokeirsebilck opened this issue Nov 8, 2024 · 6 comments
Labels

Comments

@angelokeirsebilck
Copy link

Description

I am using a CK Editor field with Entry type blocks.

On 1 page, the single section for the homepage i'm getting a JS error when adding blocks to my CK Editor field. I have 3 languages: NL,FR and EN. I only get this error on EN and FR.

When adding the block I get an JS error in the console:

Uncaught (in promise) TypeError: i.includes is not a function at ElementEditor.js:1147:18

On other pages using the same setup/CK Editor field I don't get this error.

Expected behavior

On other pages when adding the block I can see the block added in the CK Editor field.

Actual behavior

No block is added, console gives me JS error.

Additional info

  • Craft version: Craft Pro 5.4.10.1
  • PHP version: 8.3.13
  • Database driver & version: MySQL 18
  • Plugins & versions:

Amazon S3 2.2.1
Button Box 5.0.0
CKEditor 4.3.1
Control Panel CSS 3.0.0
Elements Panel 3.0.0
Embedded Assets 5.3.0
Formie 3.0.9
Hyper dev-craft-5
Image Resizer 4.0.1
Knock Knock 3.0.1
Minify 5.0.0
SEOmatic 5.1.5
Social Share 2.0.2
Sprig 3.5.1
Vite 5.0.1

I'm happy to give more details/db if needed.

@brandonkelly brandonkelly transferred this issue from craftcms/ckeditor Nov 8, 2024
@brandonkelly
Copy link
Member

Thanks for reporting that. Looks like it might be more of a Craft CMS issue despite happening in CKEditor so I transferred to the cms repo.

I can’t reproduce though, and looking at the code, I don’t understand how the error could occur. If you could send your database and Composer files into support@craftcms.com, we can look further into it from there.

@angelokeirsebilck
Copy link
Author

Thanks for reporting that. Looks like it might be more of a Craft CMS issue despite happening in CKEditor so I transferred to the cms repo.

I can’t reproduce though, and looking at the code, I don’t understand how the error could occur. If you could send your database and Composer files into support@craftcms.com, we can look further into it from there.

I've sent the composer files and DB to support@craftcms.com. Let me know if you need anything else.

@brandonkelly
Copy link
Member

Thanks, received! Which entry are you getting the error on?

@angelokeirsebilck
Copy link
Author

Thanks, received! Which entry are you getting the error on?

On the Home Single Section. For example in the CK Editor field (Column 2) on the first Block - Default when adding a Links block below the text.

@brandonkelly
Copy link
Member

Thanks! I was able to reproduce with your site, and got it fixed for the next release.

You can get the fix early by changing your craftcms/cms requirement in composer.json to:

"craftcms/cms": "5.x-dev as 5.5.0.1",

@brandonkelly
Copy link
Member

Craft 4.13.3 and 5.5.1 are out with that fix. Thanks again!

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

No branches or pull requests

3 participants
@brandonkelly @angelokeirsebilck and others