Migrating SASS Overrides To Newer Format Versions
Upon installation of the latest version of ePublisher, it is recommended that a migration of overrides is performed on any project that contains overridden files that match to a prior format version. The migration procedure works for all file types in an ePublisher project, but is highlighted for SASS because of it’s interconnected nature between the files. Sometimes, when a project is updated to the latest Format Version, users will get an error like this one when generating:
[Error] Traceback (most recent call last):
File "C:\Program Files (x86)\WebWorks\ePublisher\2018.2\Helpers\python\WebWorks\compile_sass.py", line 25, in <module>
compile_sass(input_file, output_file)
File "C:\Program Files (x86)\WebWorks\ePublisher\2018.2\Helpers\python\WebWorks\compile_sass.py", line 13, in compile_sass
_cssoutput = sass.compile(string=data)
File "C:\Program Files (x86)\WebWorks\ePublisher\2018.2\Helpers\python\lib\site-packages\sass.py", line 640, in compile
raise CompileError(v)
sass.CompileError: Error: Undefined variable: "$related-topics-title-background-color".
on line 143 of stdin
>> background: $related_topics_title_background_color;
--------------^
This error happens most commonly when a newer version of one of the SASS files has a reference to a variable that should be inside an older, overridden SASS file. The solution for this is to migrate the overridden file to the latest version, comparing the overridden version to the latest version in a diff tool, and copying your local changes to the latest version of the same file.
Refer to this article for a comprehensive list of free and paid diff tools available for Windows:
Last modified date: 11/29/2022