Having a non-default path-scheme for edit paths, $handler->getEditPath($langcode) returns false in function entity_translation_delete_confirm since initPathScheme has not been called. I fixed this in the simplest possible way, but it feels a little bit wrong that the path-scheme must me initialized explicitly outside as a public class method. If it could be initialized lazily when needed that would be better, but am not familiar enough with the code base to make such a change with confidence. (Perhaps every method that returns a path-variable could call some method "ensurePathSchemeInitialized, that makes sure that initPathScheme has been called at least once).
Comment | File | Size | Author |
---|---|---|---|
#2 | entity_translation-path-scheme-initialization-2798721-2.patch | 552 bytes | gnucifer |
|
Comments
Comment #2
gnucifer CreditAttribution: gnucifer commentedComment #3
gnucifer CreditAttribution: gnucifer commentedComment #4
gnucifer CreditAttribution: gnucifer commentedComment #5
gnucifer CreditAttribution: gnucifer commentedComment #7
plachI agree it's unfortunate that we have to do that, but lazily initializing patch schemes in the wrong bootstrap phase will cause an infinite recursion so we decided to do that manually.
Committed and pushed, thanks!