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).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

gnucifer created an issue. See original summary.

gnucifer’s picture

gnucifer’s picture

Issue summary: View changes
gnucifer’s picture

Issue summary: View changes
gnucifer’s picture

Title: Path scheme not initialized on delelete translation confirmation form » Path scheme not initialized on delete translation confirmation form

  • plach committed 164701e on 7.x-1.x authored by gnucifer
    Issue #2798721 by gnucifer: Path scheme not initialized on delete...
plach’s picture

Status: Needs review » Fixed

I 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.