Template "modular/images.html.twig" is not defined

Hi,

I’m using Antimatter and I just updated it from 1.3.9 to 1.7.5 and I have this error:

Twig_Error_Runtime
An exception has been thrown during the rendering of a template ("Template "modular/images.html.twig" is not defined.") in "modular.html.twig" at line 48.

I was running GRAV 1.4.2. I updated to 1.4.3 but it didn’t change anything. All my plugin are up to date.

I don’t think I had edited/modified any twig file in the past so i’m not sure why I have this error.

Any help would be appreciated!

Thank you.

Nevermind ! I looked in my yesterday backup and I had an “images.html.twig” in my module folder. The template update deleted the file, hence the error.

It would be nice if gpm update would not delete user created file. Or do I need to put my custom twig page file somewhere else?

Thank you.

I finally restored my complete backup. It was an error to update the template. I had too much scss and other modification made in my site and didn’t want to remake them.

Yeah that’s a tough one. I’ve basically created a new theme based on the RTFM skeleton/theme. I think the only way to reliably do this without making breaking changes is to use the theme inheritance and create a child (?) theme to modify the Antimatter theme. http://getgrav.org/blog/theme-development-with-inheritance

The latest update of Grav ‘copies’ files rather than replacing whole directories. So if you had updated your antimatter theme after upgrading to Grav 0.9.43 you probably would of been fine.

However, follow Darryl’s advice and use theme inheritance :slight_smile:

Thanks guys. I didn’t saw that blog post. however, I realize that I don’t have to update de themplate. I juste saw I could do it and I did it for no real reason. I’m just used to CMS that have security update each weeks. :slight_smile: If I understant correctly: If I don’t update the template but update the core, I won’t have any issue?