Drupal allows its core path.inc file that controls the way path aliases are fetched/stored/handled to be overridden, through the 'path_inc' variable. Some modules make use of this to add their own functionality - for example, the language_hierarchy_paths submodule in https://www.drupal.org/project/language_hierarchy (which leverages https://www.drupal.org/project/pathinc exists to make that easier), which allows fallbacks for languages. For example, so that a British English language can exist, but aliases can just be set in a 'parent' language, regular English, without needing to be duplicated into the 'child' language.
The https://www.drupal.org/project/redis project is another example of one that overrides Drupal's path alias handling.
Anyway, the option to prefetch path aliases may not be compatible with some of these path handling implementations - it's certainly not with the language hierarchy example explained above. If the option is enabled, then paths end up unaliased in the sitemap, when they ought to be.
Patch to follow...
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | xmlsitemap-prefetching_aliases_pathinc_override-2698377-10.patch | 3.96 KB | james.williams |
Comments
Comment #2
james.williamsThe attached patch implements an override, so that any modules overriding the path_inc variable can also set their own override for prefetching, which will be used if prefetching is enabled. If a module overrides the core path handler without doing so, prefetching is disabled, as it is presumed to be incompatible with other path handlers.
Comment #3
james.williamsComment #4
james.williamsComment #5
james.williamsComment #6
james.williamsSorry for the noise. Updated patch here resolves a mistake in the original path affecting the admin form for the prefetching setting.
Comment #7
chris matthews commentedThe 3 year old patch in #6 does not apply to the latest xmlsitemap 7.x-2.x-dev and if still applicable needs a reroll.
Comment #8
dave reidI wrote the prefetching feature assuming that if a user did enable one of those modules, they would disable the prefetch setting themselves? Is that the easier solution forward?
Comment #9
james.williamsHello from the future... #2697819: Language hierarchy isn't compatible with sitemap alias prefetching makes use of the idea to implement an override for one of those modules, so prefetching can still be done, just by another method. Disabling prefetching is certainly the easiest way forward of course, but prefetching is useful when possible.
I don't particularly mind if this never got moved forward, the patches are here for those of us brave enough to use them ;-)
Comment #10
james.williamsRe-rolled :-)