Can't insert link on image (Plone 5.0.6+)

I have some sites on production server developed on 5.0.0 that have link over image. I noticed since I updated to Plone 5.0.6 it isn't possible to insert a link on image.

I will describe the steps to reproduce the problem:
create a new Plone site
upload a new image
edit default front-page and insert the image
click to insert a new link (Internal or External) on image. Nothing happens when I try to click on insert button.

I updated to Plone 5.0.7 but the problem still happens. The same problem happens on a new fresh 5.0.7 installation. Is there anyone working on this problem?


Are there any errors in your browser console?

Inspecting the page, now I see that when I inserted the image or tried to insert a link on image there is one error in firefox console (logged-in.js): IndexSizeError: Index or size is negative or greater than the allowed amount.

Thanks for your time

Does this happen with another browser too?

Firefox error log:
IndexSizeError: Index or size is negative or greater than the allowed amount logged-in.js:7

Chromium, Chrome I get another error at the same file (logged-in.js): Uncaught DOMException: Failed to execute 'setBaseAndExtent' on 'Selection': There is no child at offset 1.

at j.setRng (
at (
at d.focusElement (
at HTMLImageElement.a.onload.a.onerror (

Safari, Edge and Internet Explorer 11: The error doesn't happen.

Thanks again

It seems to be a problem with TinyMCE, corrected in version 4.5.6.
Plone 5.0.8 already includes that update.

1 Like

I tested in Plone 5.0.8 and 5.1, and the error still happens. I also set up my instance to use TinyMCE 4.5.6, but still got the same error from Plone's logged-in.js. I have not yet been able to track down where in logged-in.js the error happens because everything breaks when I try to turn on development mode for this bundle :angry:

I do have the same problem:

Firefox: IndexSizeError: Index or size is negative or greater than the allowed amount

I am using Plone 5.0.8

Have you been able to fix it somehow?

I came up with a bit of a hack as a workaround - I'm sure there's a better way to do it, but this worked for me and avoids doing anything with the Resource Registry. Done in a custom Diazo theme

  • Make a copy of plone-logged-in.js and add it as a browser resource in your custom product
  • Edit the file to replace self.getSel().setBaseAndExtent(node, 0, node, 1); (found in two places) with self.getSel().setBaseAndExtent(node, 0, node, 0);
  • Add these rules to Diazo to have plone use your customized plone-logged-in.js


I have same problem on Plone 5.0.7 site. This image link is rather serious issue, especially for business users. Because they'd like to put graphic banner image link that lead the customers to their products or services detail page. Hope this issue will be solved in future Plone 5 release.

Thank you.
Shigeo Honda

There is no "5.1" yet; which beta or release candidate did you test on? From what I can see it should be fixed in mockup 2.5.0 (by upgrading tinymce -- thanks Franco) and 5.1rc1 is the first release of Plone which includes it.

But if you tested on 5.1rc1 and it still didn't work then it needs more attention.

Looks like I had tested on 5.1b3 (5.1rc1 was not yet out, but sorry for not specifying).

Just tested on 5.1rc1, and it does appear to be working!

Sorry for the late response ... your workaround did fix the problem. Thanks!!!