Review main Merged

61668[BUGFIX] Consider language context and fallbacks in persisted aspects

Nicole Hummel CR +2 V +2 Normal +162 −22 updated 02/17/20, 21:27

Commit message

For PersistedAliasMapper and PersistedPatternMapper, language handling
when resolving a URL route paramter was not explicit enough.

PersistedAliasMapper incorrectly resolved language default records even
when the HTTP request contained a language aspect and a more specific
record (having the same slug value) would have been available.

That was similar in PersistedPatternMapper when `uid` field was not
defined in corresponding pattern (e.g. `^(?P<title>.+)-(?P<uid>\d+)$).

For both mentioned scenarios language restrictions and fallback handling
has been integrated. Records are retrieved in the following order:

+ "all language (-1)", most specific if present, can't be localized
+ "current language" most specific for the current given request context
+ "language fallbacks" (might include "default language")

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 1

Files 4