XF 2.1 Error after Upgrading 2.1.5 -> 2.1.6

Masetrix

Well-known member
  • XF\CssRenderException: Error rendering template public:core.less: variable @fa-var-haykal is undefined in file public:core.less in public:core.less (on or near line 13795)
  • src/XF/CssRenderException.php:87

  • Generiert von: Unbekanntes Konto
  • 18 Dezember 2019 um 18:30
Stack-Trace
13792 | .@{fa-css-prefix}-hat-winter:before { content: @fa-var-hat-winter; }
13793 | .@{fa-css-prefix}-hat-witch:before { content: @fa-var-hat-witch; }
13794 | .@{fa-css-prefix}-hat-wizard:before { content: @fa-var-hat-wizard; }
13795| .@{fa-css-prefix}-haykal:before { content: @fa-var-haykal; }
13796 | .@{fa-css-prefix}-hdd:before { content: @fa-var-hdd; }
13797 | .@{fa-css-prefix}-head-side:before { content: @fa-var-head-side; }
13798 | .@{fa-css-prefix}-head-side-brain:before { content: @fa-var-head-side-brain; }
------------

#0 src/XF/CssRenderer.php(408): XF\CssRenderException::createFromLessException(Object(Less_Exception_Compiler), 'public:core.les...', '// Note that th...')
#1 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:core.les...', '// Note that th...')
#2 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:core.les...', NULL)
#3 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#4 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#5 css.php(30): XF\CssWriter->run(Array, 1, 2, '8d17df85a3cc79b...')
#6 {main}

-------------

Previous Less_Exception_Compiler: variable @fa-var-haykal is undefined in file anonymous-file-0.less in anonymous-file-0.less - src/vendor/oyejorge/less.php/lib/Less/Tree/Variable.php:49
#0 src/vendor/oyejorge/less.php/lib/Less/Tree/Expression.php(52): Less_Tree_Variable->compile(Object(Less_Environment))
#1 src/vendor/oyejorge/less.php/lib/Less/Tree/Value.php(27): Less_Tree_Expression->compile(Object(Less_Environment))
#2 src/vendor/oyejorge/less.php/lib/Less/Tree/Rule.php(75): Less_Tree_Value->compile(Object(Less_Environment))
#3 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(94): Less_Tree_Rule->compile(Object(Less_Environment))
#4 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(94): Less_Tree_Ruleset->compile(Object(Less_Environment))
#5 src/vendor/oyejorge/less.php/lib/Less/Parser.php(199): Less_Tree_Ruleset->compile(Object(Less_Environment))
#6 src/XF/CssRenderer.php(404): Less_Parser->getCss()
#7 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:core.les...', '// Note that th...')
#8 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:core.les...', NULL)
#9 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#10 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#11 css.php(30): XF\CssWriter->run(Array, 1, 2, '8d17df85a3cc79b...')
#12 {main}

Status der Anfrage
array(4) {
["url"] => string(140) "/css.php?css=public%3Anormalize.css%2Cpublic%3Acore.less%2Cpublic%3Aapp.less&s=1&l=2&d=1576690199&k=8d17df85a3cc79bae51c8bc6c1676fef2b4d79f0"
["referrer"] => string(36) "https://xenforo2-test.myforum.org/"
["_GET"] => array(5) {
["css"] => string(53) "public:normalize.css,public:core.less,public:app.less"
["s"] => string(1) "1"
["l"] => string(1) "2"
["d"] => string(10) "1576690199"
["k"] => string(40) "8d17df85a3cc79bae51c8bc6c1676fef2b4d79f0"
}
["_POST"] => array(0) {
}
}



Any Hints?
 
You likely have outdated templates that need to be resolved. Specifically I suspect your core_fa.less template is outdated.

FWIW we'd strongly advise that you do not edit this template in future for this very reason.

If it is modified in your style provided to you by whoever designed your style then you should raise this with them.
 
Ideally avoid modifying any template that begin with setup_ or core_.
glad to know i need to prepare for this upgrade....

we still need to edit this core_fa.less, just to get the brands icons to display....i made a thread about it a while ago, but not sure i was understood as there seemed to be a few related issues...

i would prefer to have it fixed in the core coding and not have to worry about booby traps like this one, any suggestion here?

icon hack.webp
 
No changes are required to support brand icons or any other icon type in XF. If you are experiencing issues with that you probably need to make a separate thread to try and explain the issue again.

On this very forum you can see Brand icons in various places, including at the bottom of this thread.

That should work by default in XF without any code changes.
 
Back
Top Bottom