heidkaemper / craft-redactor-anchors

Support for anchors in Craft CMS Redactor
https://plugins.craftcms.com/redactor-anchors
MIT License
10 stars 4 forks source link

Uncaught RangeError: Maximum call stack size exceeded #6

Closed icreatestuff closed 2 years ago

icreatestuff commented 2 years ago

I have a redactor field with quite a lot of text, approximately 6,000 characters. The text includes 7 regular links and 3 anchor links.

When I try to add an 8th link by highlighting some text, clicking the link icon and then 'Insert Link' option from the dropdown I am not shown the modal for adding the link details e.g. the URL. When I open up the developer console I see an Uncaught RangeError: Maximum call stack size exceeded error followed by 10 identical lines:

at s.$R.modals.link.$R.modules.link.$Link._setFormData [as _setFormDataOrigin] (redactoranchors.js:1:1216)

Screenshot 2022-01-27 at 10 08 55

It seems to correlate that the 10 repeated errors match up with the 10 existing links on the page but that may not be accurate.

I also cannot edit an existing link in the field, I'm shown the same errors in the console and no modal appears.

Edit: Further investigation leads me to believe this only becomes a problem when there is more than 1 redactor field within the entry. I'm not sure if this is relevant or not but the redactor field(s) I have are within Matrix blocks.

Many thanks, Matt

Web Browser: Google Chrome 97.0.4692.99 Craft: 3.7.30.1 Redactor: 2.8.8 Redactor Anchors: 1.3.1

jl-digital commented 2 years ago

I encountered the same problem. I temporality solved it by removing 'redactoranchors' from the plugin list in the Redactor config file. Now I can edit and create links again. Waiting for a fix..

heidkaemper commented 2 years ago

Should be fixed with version 1.3.2 https://github.com/heidkaemper/craft-redactor-anchors/releases/tag/1.3.2