Undefined variable $...
Description
You get the error message Unable to compile the theme "...". Undefined variable $...
.
Cause
Crucial here is the note "Undefined variable $...". This means that an unknown variable was entered in a configuration field and in which configuration field this is the case respectively what the technical name of the field is: $...
Example:
If the error message says Unable to compile the theme "TcinnThemeWareModern". Undefined variable $twt-color-brand-primary-light: line: 12, column 1
, for example, the theme cannot be compiled or even saved due to an error in the $twt-color-brand-primary-light
configuration field.
Note: If the error is not "Undefined variable $..." but "parse error: failed at $..." please have a look at this article: Parse error: failed at $...
Solution
Just change the corresponding configuration field.
If you don't know which configuration field you are dealing with, just visit the ThemeWare® Config Finder and search there for the technical name twt-color-brand-primary-light
(without the "$").
Tip: Often this error occurs when variables are used in configuration fields, but the variables have not yet been initialized at this point. Then just use the RGBA or HEX value of a color instead of the variable.
After you have adjusted the field, the theme or the duplicate can be saved and compiled again.
Issue not solved?
If you could not solve the problem, simply start the ThemeWare® Debugging. You can open a support ticket in case you are not able to solve the problem yourself:
Last updated