Problem/Motivation

Entity Reference Dialog Formatter path ("/entity_reference_dialog_formatter/") are being indexed by search engines.

Steps to reproduce

None

Proposed resolution

Add noindex meta tag on applicable paths.

Remaining tasks

None

User interface changes

Patch additional make the link_title field in the formatter configuration settings conditionally display when "Use entity label" in unchecked.

API changes

None

Data model changes

None

CommentFileSizeAuthor
#3 3198253-02.patch1.97 KBbamberjp
#2 3198253.patch2.26 KBbamberjp
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bamberjp created an issue. See original summary.

bamberjp’s picture

StatusFileSize
new2.26 KB
bamberjp’s picture

StatusFileSize
new1.97 KB

Changed path check to regex for language support.

phjou’s picture

Status: Active » Needs work

Nice feature, but the test of the path should simply check the route name than doing a preg_match that will fail if someone create an alias on one of those paths.

replicaobscura’s picture

Thanks for the patch! I totally agree with preventing these pages from being indexed, but I also agree that it would be best if we could use the route name for this instead of relying on path matching.

scottsawyer made their first commit to this issue’s fork.

scottsawyer’s picture

I took a different tact. Instead of adding a noindex to the rendered dialog result, I added a nofollow to the link.

scottsawyer’s picture

Status: Needs work » Needs review

Please see MR

scottsawyer changed the visibility of the branch 3198253-entity-reference-dialog to hidden.

scottsawyer changed the visibility of the branch 3198253-entity-reference-dialog to active.

scottsawyer’s picture

Ok, I noticed a problem saving the field settings (forgot the default value). I left the default value as FALSE to not accidentally break existing expectations, though I would prefer "nofollow" be the default.

I also cleaned up some of the string translations, I couldn't resist.