Problem/Motivation
When I create an RSS Feed view and assign the RSS setting "Link" to my path field added to the View, I'm receiving the following (example):
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: The internal path component 'http://cmslocal.gfs.com/en-us/ideas/minding-the-menu-labeling-law' is external. You are not allowed to specify an external URL together with internal:/.
It seems like at some point the "Path" content field within Views now outputs an absolute URL. Or at least it does for me and I can't change it, even with the checkbox "Use absolute link (begins with "http://")" unchecked. Perhaps it's because my project is using the Domain module.
Regardless, I believe the RSS row plugin should allow both absolute and relative. I'm not sure there's a good reason it doesn't?
Steps to reproduce
- Create a views RSS feed display.
- Configure the display to show fields: Format > Show: Fields
- Add all required fields to the display.
- For the link field, use "Link to Content" and enable "Use absolute link" for this field.
- Configure the display's RSS fields:
- Map the link field to the link field create above in #4.
- Map the GUID field to the link field create above in #4, and enable "GUID is permalink".
- Save the view - however the preview most likely already failed
- View the page for the RSS feed
- Bug:
The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">InvalidArgumentException</em>: The internal path component 'http://cmslocal.gfs.com/en-us/ideas/minding-the-menu-labeling-law' is external. You are not allowed to specify an external URL together with internal:/.
Proposed resolution
Update the \Drupal\views\Plugin\views\row\RssFields
to detect absolute links and output them correctly.
Remaining tasks
None
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
NA