Skip to content

New links in rich text tiles save incorrect href attributes causing problems for situations where editing/view virtual host configurations are different #462

@arterrey

Description

@arterrey

Given a Plone site installed at /Plone

  1. Have the network tab in Chrome open in the background
  2. Select a piece of text in the rich text editor and add a link to it using the link button on the toolbar.

A POST is created to save a draft, something like...

...
plone.app.standardtiles.html.content: <p><a href="/Plone/resolveuid/3c99581261e6479bb0500daea17f57fe" data-linktype="internal" data-val="3c99581261e6479bb0500daea17f57fe" data-mce-href="../resolveuid/3c99581261e6479bb0500daea17f57fe">Lorem ipsum</a> dolor sit amet...

Note the link href is /Plone/resolveuid/3c99581261e6479bb0500daea17f57fe

  1. Click inside the link and click the link tool bar icon and select the same target and click insert

Another POST is created to save the draft...

...
plone.app.standardtiles.html.content: <p><a href="../resolveuid/3c99581261e6479bb0500daea17f57fe" data-linktype="internal" data-val="3c99581261e6479bb0500daea17f57fe" data-mce-href="../resolveuid/3c99581261e6479bb0500daea17f57fe" data-mce-selected="inline-boundary" text="Lorem ipsum">`</a> dolor sit amet, consectetuer adipiscing elit. Sed...

Note the link href is now ../resolveuid/3c99581261e6479bb0500daea17f57fe which is actually what I'm after and what I understand to be correct.

Setting the data of a tile resolveuid link which includes the Plone site name in it will work for situations where the url routing is the same for editing and viewing the plone site. If however the Plone site is viewed on a different url from the editing site the resolveuid transform wont happen and the link will be broken.

Versions:
plone.app.standardtiles 2.3.2
plone.app.mosaic 2.2.1
Plone 5.2.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions