- Issue created by @mandclu
I will start looking into this issue in the mentored contribution room.
- π¬π§United Kingdom alexpott πͺπΊπ
This feels like the router is not building rebuilt. When a view is saved the router needs rebuild flag should be set - see \Drupal\views\Entity\View::postSave() - so the question is why has this not happened. This feels like the way the recipe commands are being run are not correctly triggering destructable services during kernel termination.
I was able to reproduce the issue as mentioned.
The easiest solution would be to add a cache clear at the end of the RecipeCommand. The question is if this is a sufficient solution. This might lead to unnecessary cache clears, e.g. when applying a recipe that would not require a cache clear or when adding multiple recipes at once.
The getting started documentation of distributions_recipes, also mentions that a cache clear is required after applying a recipe.- π¬π§United Kingdom alexpott πͺπΊπ
@grietdk we should not need to add a cache clear. The system should do the necessary rebuilding without having to do a generic cache clear.
- π¦πΊAustralia pameeela
From what I can tell, this only occurs when applying a recipe from command line. I don't think I've seen it when using PB, and just now I tried both (once each, but still) and only had the issue with cli.
Adding it as a target because the bug is causing a fatal error with the Blog recipe because it includes an RSS feed link in the view. If you install without blog, and apply the recipe from cli, clicking the 'Blog' link in the menu results in:
The website encountered an unexpected error. Try again later. Symfony\Component\Routing\Exception\RouteNotFoundException: Route "view.blog.rss" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 211 of core/lib/Drupal/Core/Routing/RouteProvider.php).
I don't think this is a blocker necessarily, if it's true that it only happens when using cli.