Theme save error

When saving the theme, a 500 error occurs if you enter the wrong data.

Occasionally, you may have changed a setting in the theme or another extension and an error is thrown as a result when saving / compiling the theme. Often the error messages of Shopware are not understandable and the search for the error begins. We would like to give you a little help to find common error sources faster.

What happens when you save

When you save a theme, the values set in the theme configuration are applied and a CSS (stylesheet) file is created for output to the storefront.

To be able to use the variables of the theme configuration, a so-called "preprocessor" for CSS is used in the background instead of CSS. Shopware 6 uses SASS/SCSS for this purpose. When saving the theme, individual SCSS files are converted into a simple CSS file and the variables are stored as fixed values of the respective property.

If a variable does not exist, is written incorrectly or there is a syntax error, this process is stopped and the error appears in the administration.

Common causes are:

  1. a variable was written incorrectly

  2. a variable was specified that does not exist

  3. a syntax error was provoked (this can already happen if a color value consists only of 5 instead of 6 digits. Example: #12345 vs. #123456 )

  4. A new extension was installed and has an error in a SCSS file

  5. Individual customizations in the theme can trigger the problem

  6. The server does not have enough memory to perform the compilation.

How to solve this problem?

Root cause analysis is the first step in fixing the error. Often it is not clear whether a theme, an app / plugin or Shopware itself is the cause of an error.

Check edits

Consider what was last changed in the theme configuration. Have any adjustments been made here recently? Then you have to check them.

Since when does the error exist

Occasionally it happens that such an error has existed for a long time and only appears when another extension is installed and the theme is compiled again.

Identify theme as cause

pageFind cause

Always work in small steps - do not make too many changes at once. It is better to make only a few changes and compile in between by saving the theme again and again. This way you can track down the cause more easily, should one of your changes have led to an error.

Last updated