At the moment a (configurable) message is displayed when the entered value is not unique. However, the user has no way of figuring out which entity has this value (besides actively searching for it). UX-wise it would be a nice improvement if the error message contained a link to the relevant entity.

Comments

rp7 created an issue. See original summary.

rp7’s picture

Status: Active » Needs review
StatusFileSize
new4.18 KB

Patch attached allows you to enter a placer %link in the error message configuration screen. When the error message is displayed, this placeholder will be replaced by a link to the entity.

If the user has no access to this entity, "Unknown" is displayed instead.

rp7’s picture

For anyone interested in using patch provided in #2 in combination with patch #2 provided in #3003948: Add support for link field: patch attached.

skymen’s picture

Issue summary: View changes
StatusFileSize
new25.82 KB

@rp7 Thanks for this functionality!
I have tested patch 3. It works good but the code does search only the first node and displays a link to it.
I think it would be more convenient for many users to see a complete list of links to materials with same field value. And to make the form more accurate with a large number of links we can add to the field settings limit on the number of displayed nodes.
Something like that:

skymen’s picture

Issue summary: View changes
glottus’s picture

This is an adaptation of the patch in #2 that applies against the newer 2.0.1 version of unique_field_ajax. I can open a separate issue for that version instead, if preferred.

  • Eli.Stone committed af0e556 on 2.x authored by Glottus
    Issue #3077634 by rp7, Glottus, Skymen: Display a link to the entity...
3li’s picture

Thanks all for the work, I have merged in #6 and done some refactoring so that ajax and form submit both have their messages going through one method.

If you could review / test it is on the 2.x branch.
Thanks

3li’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

3li’s picture

Version: 8.x-1.x-dev » 2.x-dev