XF 2.1 Issues after upgrading

ludak

Active member
Hi,

I have upgraded from version 2.0.9 to version 2.1.3, and i am getting the server logs constantly.
  • ErrorException: Template error: Template public:setup_fa_variables.less is unknown
  • src/XF/Template/Templater.php:618
  • Generated by: Unknown account
  • Jul 29, 2019 at 11:31 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/home/juznatri/...', 618, Array)
#1 src/XF/Template/Templater.php(618): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(566): XF\Template\Templater->getTemplateData('public', 'setup_fa_variab...')
#3 src/XF/Template/Templater.php(1314): XF\Template\Templater->getTemplateCode('public', 'setup_fa_variab...')
#4 src/XF/Template/Templater.php(1388): XF\Template\Templater->renderTemplate('public:setup_fa...', Array)
#5 internal_data/code_cache/templates/l3/s5/public/setup.less.php(38): XF\Template\Templater->includeTemplate('setup_fa_variab...', Array)
#6 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#7 src/XF/CssRenderer.php(664): XF\Template\Templater->renderTemplate('public:setup.le...', Array)
#8 src/XF/CssRenderer.php(399): XF\CssRenderer->getLessPrepend()
#9 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:core.les...', '// ############...')
#10 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:core.les...', NULL)
#11 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#12 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#13 css.php(30): XF\CssWriter->run(Array, 5, 3, '304bf642885c9dc...')
#14 {main}

  • ErrorException: Error rendering template public:core.less: [E_WARNING] substr_count(): Length should be greater than 0
  • src/XF/CssRenderException.php:27
  • Generated by: Unknown account
  • Jul 29, 2019 at 11:28 AM
Stack trace
#0 [internal function]: XF::handlePhpError(2, 'substr_count():...', '/home/juznatri/...', 27, Array)
#1 src/XF/CssRenderException.php(27): substr_count('// Note that th...', '
', 0, 0)
#2 src/XF/CssRenderException.php(87): XF\CssRenderException->__construct('variable @fa-cs...', 'public:core.les...', '// Note that th...', 1, NULL, Object(Less_Exception_Compiler))
#3 src/XF/CssRenderer.php(408): XF\CssRenderException::createFromLessException(Object(Less_Exception_Compiler), 'public:core.les...', '// Note that th...')
#4 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:core.les...', '// ############...')
#5 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:core.les...', NULL)
#6 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#7 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#8 css.php(30): XF\CssWriter->run(Array, 5, 1, '304bf642885c9dc...')
#9 {main}

  • XF\CssRenderException: Error rendering template public:share_controls.less: No matching definition was found for .m-faBase with args 'Pro' in public:share_controls.less (on or near line 740)
  • src/XF/CssRenderException.php:87
  • Generated by: Unknown account
  • Jul 29, 2019 at 11:31 AM
Stack trace
737 | display: inline-block;
738 | vertical-align: middle;
739 |
740| .m-faBase('Pro');
741 | }
742 |
743 | &.shareButtons-button--brand
------------

#0 src/XF/CssRenderer.php(408): XF\CssRenderException::createFromLessException(Object(Less_Exception_Compiler), 'public:share_co...', '// Note that th...')
#1 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:share_co...', '.shareButtons
{...')
#2 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:share_co...', 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, 5, 3, '985ad8475e5f081...')
#6 {main}

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

Previous Less_Exception_Compiler: No matching definition was found for .m-faBase with args 'Pro' in anonymous-file-253.less - src/vendor/oyejorge/less.php/lib/Less/Tree/Mixin/Call.php:146
#0 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(147): Less_Tree_Mixin_Call->compile(Object(Less_Environment))
#1 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(88): Less_Tree_Ruleset->EvalMixinCalls(Object(Less_Tree_Ruleset), Object(Less_Environment), 3)
#2 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(94): Less_Tree_Ruleset->compile(Object(Less_Environment))
#3 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(94): Less_Tree_Ruleset->compile(Object(Less_Environment))
#4 src/vendor/oyejorge/less.php/lib/Less/Parser.php(199): Less_Tree_Ruleset->compile(Object(Less_Environment))
#5 src/XF/CssRenderer.php(404): Less_Parser->getCss()
#6 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:share_co...', '.shareButtons
{...')
#7 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:share_co...', NULL)
#8 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#9 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#10 css.php(30): XF\CssWriter->run(Array, 5, 3, '985ad8475e5f081...')
#11 {main}

  • XF\CssRenderException: Error rendering template public:node_list.less: variable @fa-var-comments is undefined in file public:node_list.less in public:node_list.less (on or near line 734)
  • src/XF/CssRenderException.php:87
  • Generated by: Unknown account
  • Jul 29, 2019 at 11:31 AM
Stack trace
731 | .node--forum &:before,
732 | .node--category &:before
733 | {
734| .m-faContent(@fa-var-comments);
735 | }
736 |
737 | .node--page &:before
------------

#0 src/XF/CssRenderer.php(408): XF\CssRenderException::createFromLessException(Object(Less_Exception_Compiler), 'public:node_lis...', '// Note that th...')
#1 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:node_lis...', '@_nodeList-stat...')
#2 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:node_lis...', 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, 5, 3, '985ad8475e5f081...')
#6 {main}

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

Previous Less_Exception_Compiler: variable @fa-var-comments 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/Mixin/Call.php(43): Less_Tree_Expression->compile(Object(Less_Environment))
#2 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(147): Less_Tree_Mixin_Call->compile(Object(Less_Environment))
#3 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(88): Less_Tree_Ruleset->EvalMixinCalls(Object(Less_Tree_Ruleset), Object(Less_Environment), 1)
#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/Tree/Ruleset.php(94): Less_Tree_Ruleset->compile(Object(Less_Environment))
#6 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(94): Less_Tree_Ruleset->compile(Object(Less_Environment))
#7 src/vendor/oyejorge/less.php/lib/Less/Parser.php(199): Less_Tree_Ruleset->compile(Object(Less_Environment))
#8 src/XF/CssRenderer.php(404): Less_Parser->getCss()
#9 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:node_lis...', '@_nodeList-stat...')
#10 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:node_lis...', NULL)
#11 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#12 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#13 css.php(30): XF\CssWriter->run(Array, 5, 3, '985ad8475e5f081...')
#14 {main}

  • ErrorException: Template error: Template public:setup_fa_variables.less is unknown
  • src/XF/Template/Templater.php:618
  • Generated by: Unknown account
  • Jul 29, 2019 at 11:31 AM
Stack trace
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, 'Template public...', '/home/juznatri/...', 618, Array)
#1 src/XF/Template/Templater.php(618): trigger_error('Template public...', 512)
#2 src/XF/Template/Templater.php(566): XF\Template\Templater->getTemplateData('public', 'setup_fa_variab...')
#3 src/XF/Template/Templater.php(1314): XF\Template\Templater->getTemplateCode('public', 'setup_fa_variab...')
#4 src/XF/Template/Templater.php(1388): XF\Template\Templater->renderTemplate('public:setup_fa...', Array)
#5 internal_data/code_cache/templates/l3/s5/public/setup.less.php(38): XF\Template\Templater->includeTemplate('setup_fa_variab...', Array)
#6 src/XF/Template/Templater.php(1315): XF\Template\Templater->{closure}(Object(XF\Template\Templater), Array)
#7 src/XF/CssRenderer.php(664): XF\Template\Templater->renderTemplate('public:setup.le...', Array)
#8 src/XF/CssRenderer.php(399): XF\CssRenderer->getLessPrepend()
#9 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:core.les...', '// ############...')
#10 src/XF/CssRenderer.php(250): XF\CssRenderer->renderTemplate('public:core.les...', NULL)
#11 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
#12 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
#13 css.php(30): XF\CssWriter->run(Array, 5, 3, '304bf642885c9dc...')
#14 {main}

These are just some of the errors, some are repeating constantly.

I have done the file check and everything seems to be in order and all files state as healthy. I disabled all the plugins - I don't have many and still getting the errors.

everything seems to be working fine with the board at the moment, but I would like to resolve these errors.
 
Its the issue with the styles, I did not have a default style and my styles (based on the previous default) are now wrong :(.. Do I have to recreate the other styles
 
I only always used default styles and only changed the properties. Something must have changed between the versions as the styles are not rendering fine anymore.
 
There's only one XF default style, to be clear. It might be easiest just to create a new one in your admin. Choose "Add style" and "No parent," give it a name (such as "XF default") and then save, then set that style as the default style.
 
I did..

Problem was that I created with earlier version 2 more styles that are not inheriting from default, and allowed only those two to be used. Since something got changed in the updates (recent), those styles are not working anymore. I just created a default style again and that one is working, however I need to create 2 offstyles (from default, and then apply what I had before).
 
Back
Top Bottom