U4-11596 - Update to Link Picker has caused issues with saving manual urls.

Created by Mike Masey 22 Aug 2018, 08:12:10 Updated by Sebastiaan Janssen 23 Aug 2018, 19:32:43

Tags: PR

Relates to: U4-4732

I'm creating this ticket to create some visibility for a bug created by a PR for this issue - http://issues.umbraco.org/issue/U4-4732.

Currently if you try to save a link in an RTE without a querystring or anchor it wipes the link on save.

Steps to reproduce.

  1. Install a fresh instance of the Umbraco using the starter theme
  2. Navigate to "About Us" in the backoffice
  3. Select some text in the RTE shown in the grid and add a link manually. e.g. "http://issues.umbraco.org"
  4. Click Submit
  5. Edit the newly created link and you will see that the URL has gone.

If a hash or querystring is present in the url, it will save successfully.

I've create a branch off of v7.12.1 and have fixed the data loss issue with the link picker. A link to the commit with the fix can be found at https://github.com/MMasey/Umbraco-CMS/commit/d875fc48fb63f634cedb0cde52c22287ad55bd73 (I created this branch under the previous issue ID, i'm happy to copy it over the this new issue if required.

I don't want to submit a PR just yet because one other thing I've noticed is that if you enter a hash, then afterwards a querystring (for example if you wanted to anchor to a point in a page with some content pre-filtered) it will only show the hash, but not the querystring. The link itself still has the querystring, it just doesn't appear in the UI.

Steps to reproduce this are. (It may be a bit convoluted, just trying to think of all the ways this could be used)

  1. In an RTE, select some text and create a new link with a hash included "http://issues.umbraco.org#test"
  2. Hit submit to close the link picker overlay
  3. Edit the link just created to open the link picker again. This should show the link with the hash in the anchor/querystring field.
  4. In the Link field, update the link to "http://issues.umbraco.org?key=value"
  5. Hit submit to close the link picker overlay.
  6. Inspect the link in dev tools, it should show as "http://issues.umbraco.org?key=value#test"
  7. Edit the link again to open the link picker overlay. In the link field i should say "http://issues.umbraco.org" and in the Anchor / querystring field it says "test".
  8. If you hit submit, the link will be updated to "http://issues.umbraco.org#test"

I wonder whether there querystring / anchor field even needs to be present for manually entered links. Maybe it could be displayed only if the person has selected a internal node. Also, querystring and anchors have different behaviors so i'm not sure if one fields is fit for purpose.

Another thing @callumbwhyte brought up in conversation is whether "querystring" is a term that content editors would understand. Is there a better term for non developers maybe, or perhaps it needs some descriptive text as to what it does?

1 Attachments


OleP 22 Aug 2018, 11:09:47

Also the dialog ui seems broken after the PR

Mike Masey 22 Aug 2018, 11:19:04

@OleP That looks like an issue in RJP.MultiUrlPicker if i'm not mistaken. If you update to the latest version Rasmus has added a patch.

OleP 22 Aug 2018, 13:06:57

@MikeM Thanks!

Sebastiaan Janssen 23 Aug 2018, 17:12:10

PR: https://github.com/umbraco/Umbraco-CMS/pull/2868

Sebastiaan Janssen 23 Aug 2018, 19:32:39

The PR needed a bit more work, but is now merged: https://github.com/umbraco/Umbraco-CMS/pull/2868#issuecomment-415545515

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions: 7.12.0, 7.12.1

Due in version: 7.12.2


Story Points: