Closed (fixed)
Project:
Drupal core
Version:
8.1.x-dev
Component:
link.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2016 at 15:18 UTC
Updated:
17 May 2016 at 10:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
boobaaI found the offending line in \Drupal\link\Plugin\Field\FieldFormatter::buildUrl():
should be$options = $item->options;$options = $url->getOptions();and this change seems to fix the problem (patch is coming). This line was introduced in #2054011: Implement built-in support for internal URLs.Comment #3
boobaaLet's see an initial testbot run. (Initial, because I don't think there are tests for this case yet.)
Comment #5
boobaaOkay, so neither the item nor the url options are enough by themselves. Working on a fixed patch with tests as well.
Comment #6
boobaaA patch with tests only (failing where it should on my local) and a patch with test and the fix (passing on my local).
Comment #8
jan.mashat commentedComment #9
dawehnerLooks properly for me! I'm glad we have test coverage for it now!
Comment #10
alexpott@jan.mashat generally an rtbc requires some evidence that you've reviewed the patch and thought about any consequences. This rtbc makes me suspect you and @Boobaa work for the same company.
This looks fine.
$item->optionshas to be an array and we're going to call$url->setOptions()later so this is kind of a merge.$url->getOptions()will always return an array too and we should use any options set in$item->optionsover the url options. So this looks good to go.Comment #11
alexpottCommitted 6b947a6 and pushed to 8.1.x and 8.2.x. Thanks!