Closed (fixed)
Project:
Feeds
Version:
8.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2019 at 15:13 UTC
Updated:
26 Apr 2020 at 15:19 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
artematem commentedComment #4
artematem commentedUpdate patch + test. Not sure if this is best decision, but for start ok.
Comment #5
artematem commentedComment #6
megachriz\Drupal::pathValidator()is not available in unit tests. If this service is needed, it needs to be injected.I also found out that internal links were not accepted. Thus if the url source starts with "internal:/".
We might need a kernel test for importing links too.
Comment #7
artematem commentedI added Tamper with str replace to change "http://example.com/" to "internal:/" before passing to feed target.
Comment #8
megachrizNeeds work because the current patch breaks tests, but also because additional tests are needed.
An unit test is needed to test that relative links are supported in
Link::prepareValue(). The patch provides this, but it also removes testing that passing a non-url value results into an empty value.A kernel test is needed to test that importing relative links is passing field validation.
Comment #9
megachrizHere is a patch with tests.
Comment #11
megachrizIt would be great if internal links are automatically prepended with "internal:/", so the source doesn't need to add that prefix.
Comment #12
megachrizThis adds the prefix "internal:" if the input url is something like "/node".
Feeds now also converts
<front>,<nolink>and<none>the same as the link widget does.Comment #13
megachrizCommitted #12.