I upgraded to 8.3 properly, but now me this error appears

Twig_Error_Loader: Template "themes/teatro/templates/node/article/ds-2col.html.twig" is not defined (Drupal\Core\Template\Loader\ThemeRegistryLoader: Unable to find template "themes/teatro/templates/node/article/ds-2col.html.twig" in the Drupal theme registry.). in Twig_Loader_Chain->getCacheKey() (line 10 of modules/contrib/ds/templates/ds-entity-view.html.twig).

the strange thing is that are involved all the custom templates that I had created in my custom theme

Ex. I've not a /templates/node/article/ds-2col.html.twig overrided, but i've:

/templates/node/article/ds-2col--node-article-search-result.html.twig
/templates/node/article/ds-2col--node-article-slideshow.html.twig
/templates/node/article/ds-2col--node-article-teaser.html.twig

Comments

sedax created an issue. See original summary.

sedax’s picture

Issue summary: View changes
sedax’s picture

Priority: Normal » Major
swentel’s picture

Is layout discovery enabled ? See #2860816: Create update hook to uninstall layout_plugin and install layout_discovery - layout plugin needs to be uninstalled, layout discovery installed. That patch has an update hook to fix that.

sedax’s picture

Yes, I've applied the patch before upgrading:

ds module : 
  8003 -   Uninstalls Layout plugin, then enables Layout Discovery. 
Performing ds_update_8003 
swentel’s picture

Hmm, that's unfortunate .. I'd have to try and setup the exact environment to try and reproduce the problem, it's been a while since I actually did many overrides, I'll try during the weekend.

sedax’s picture

I tell you my procedure, maybe it's just a mistake as I proceed:

I've upgraded with composer ds (with the patch above),panel and drupal core.

I can not update bootstrap_layouts before upgrading because they toss Drush updatedb back to me:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "plugin.manager.bootstrap_layouts" has a dependency on a non-existent service "plugin.manager.core.layout". in...

So, I run the first update that ends immediately before updating DS because returns:

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: The service "plugin.manager.bootstrap_layouts" has a dependency on a non-existent service "plugin.manager.core.layout". in    [error]
/var/www/teatro.it/vendor/symfony/dependency-injection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:58

At this point I upgrade bootstrap_layouts and relaunch drush updatedb which ends successfully with all updates

aspilicious’s picture

I think you have the same issue as I had, can you try the patch in #2860490, the solution is "incorrect" but it gives an idea of the problems people are running into.

aspilicious’s picture

sedax’s picture

I tried it with the latest patch but it does not change anything, no one has any idea how to solve? the problem is very serious and block any possible update...

aspilicious’s picture

sedax I think you maybe need to rename your layouts and the patch from https://www.drupal.org/node/2802429
We are trying to figure out what has to be changed.

sedax’s picture

Ok, after applied all patches it doens't return me any errors, but if I change my template name with the new provided (layout__), it show me only <>, same as https://www.drupal.org/node/2857972

I've debugged the file and all variables are moved (ex. left is content.left).

aspilicious’s picture

I think you didn't apply the patches correctly in that case, and you also should clear all your caches.

swentel’s picture

Status: Active » Closed (duplicate)

I have a patch at #2857972: Some content wrappers are not passed to display suite layouts overridden twig templates which proves nothing is wrong with the base templates, so #2802429: Display layout twig not overridable. will probably be the solution, writing tests for that now and checking what the exact fix needs to be.