Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
link.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Jul 2014 at 11:24 UTC
Updated:
14 Sep 2015 at 17:21 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
larowlanComment #2
maijs commentedAttaching a test patch.
<front>is added to the list of allowed internal paths.assertRaw(String::checkPlain($value))rather than withassertRaw($value)as link value is displayed in a textfield (for example,<front>becomes<front>).assertFieldByName("{$field_name}[0][url]", $value, t('The URL @url in entity edit form is correct.', array('@url' => $value)))asserts whether link value that is displayed on the entity edit form is the same as user has entered it.This bug makes a link field module unusable because entities, that have link field attached to them, cannot be successfully re-saved without reentering the path again if link URL is intended to be an internal path.
Comment #3
maijs commentedThe patch attached contains improved test and solution for this problem.
Update to the test:
massageFormValues()inLinkWidgetclass modifies the path entered by user so that the system path is stored, if an alias is provided. Therefore system path should be used in asserting the saved link URL value, if the link provided is an internal path.Solution:
In entity edit form a system path should be displayed in link field URL textfield, rather than generated URL from that path, if user entered an internal path.
Comment #4
maijs commentedShort description updated.
Comment #8
maijs commentedUpdated patch after changes made to link module.
Comment #11
lendudeThis has been fixed by #2418017: Implement autocomplete UI for the link widget