Problem/Motivation
In a quest to make XML Sitemap generate proper links for multilingual sites (started with #2781603: Add support for entity translations), I saw that our usage of paths was outdated (D7-ish).
For example, on a sitemap in a different language than the default site language, the sitemap link for the frontpage did not receive the ID of the language as a suffix. ("http://site.example" instead of "http://site.example/fr").
Proposed resolution
Update all the code around storing and generating paths.
Since this is a very big change that impacts the core functionality of the module, I also had to fix all the remaining test fails on DrupalCI (30347dd and 68beef5) so we can be sure that we're not breaking anything.
Remaining tasks
None.
User interface changes
Custom paths must start with a leading slash.
API changes
Nope.
Data model changes
Paths that do not start with a slash are no longer valid.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2783387.patch | 16.42 KB | amateescu |
Comments
Comment #2
amateescu CreditAttribution: amateescu for Chapter Three commentedAnd here's a patch.
Comment #4
amateescu CreditAttribution: amateescu for Chapter Three commentedOk, the testbot confirms that we're not breaking anything, so I committed and pushed to 8.x-1.x.