XF 2.2 Error rendering template public:core.less: .m-blockAligner is undefined in public:core.less

Masetrix

Well-known member
After upgrading from XF2.1 to XF 2.2 Beta 2
I have 3 error messages (ACP Server Errorlog), that was not the case with Beta1.

Error 1:
Server error log



  • XF\CssRenderException: Error rendering template public:core.less: .m-blockAligner is undefined in public:core.less (on or near line 12156)
  • src/XF/CssRenderException.php:87

  • Generated by: Unknown account
  • Aug 9, 2020 at 12:01 PM


Stack trace​


12153 | display: block;
12154 | }
12155 |
12156| .m-blockAligner();
12157 |
12158 | &.bbImageAligned--left
12159 | {
------------

#0 src/XF/CssRenderer.php(416): XF\CssRenderException::createFromLessException()
#1 src/XF/CssRenderer.php(350): XF\CssRenderer->renderToCss()
#2 src/XF/CssRenderer.php(258): XF\CssRenderer->renderTemplate()
#3 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates()
#4 src/XF/CssWriter.php(53): XF\CssRenderer->render()
#5 css.php(30): XF\CssWriter->run()
#6 {main}

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

Previous Less_Exception_Compiler: .m-blockAligner is undefined in anonymous-file-0.less - src/vendor/oyejorge/less.php/lib/Less/Tree/Mixin/Call.php:149
#0 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(147): Less_Tree_Mixin_Call->compile()
#1 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(88): Less_Tree_Ruleset->EvalMixinCalls()
#2 src/vendor/oyejorge/less.php/lib/Less/Tree/Ruleset.php(94): Less_Tree_Ruleset->compile()
#3 src/vendor/oyejorge/less.php/lib/Less/Parser.php(199): Less_Tree_Ruleset->compile()
#4 src/XF/CssRenderer.php(412): Less_Parser->getCss()
#5 src/XF/CssRenderer.php(350): XF\CssRenderer->renderToCss()
#6 src/XF/CssRenderer.php(258): XF\CssRenderer->renderTemplate()
#7 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates()
#8 src/XF/CssWriter.php(53): XF\CssRenderer->render()
#9 css.php(30): XF\CssWriter->run()
#10 {main}


Request state​


array(4) {
["url"] => string(140) "/css.php?css=public%3Anormalize.css%2Cpublic%3Acore.less%2Cpublic%3Aapp.less&s=1&l=2&d=1596967010&k=8d17df85a3cc79bae51c8bc6c1676fef2b4d79f0"
["referrer"] => string(36) "https://xenforo2-test.elo-forum.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) "1596967010"
["k"] => string(40) "8d17df85a3cc79bae51c8bc6c1676fef2b4d79f0"
}
["_POST"] => array(0) {
}
}

Error 2.
  • ErrorException: Renamed column xf_thread.vote_score to vote_score__conflict to avoid schema conflict
  • src/XF/Error.php:75

  • Generated by: Unknown account
  • Aug 9, 2020 at 11:48 AM


Stack trace​


#0 src/XF.php(189): XF\Error->logError()
#1 src/XF/Db/Schema/Column.php(393): XF::logError()
#2 src/XF/Db/Schema/Alter.php(238): XF\Db\Schema\Column->getDefinition()
#3 src/XF/Db/Schema/AbstractDdl.php(147): XF\Db\Schema\Alter->getQueries()
#4 src/XF/Db/SchemaManager.php(149): XF\Db\Schema\AbstractDdl->apply()
#5 src/XF/Install/InstallHelperTrait.php(670): XF\Db\SchemaManager->alterTable()
#6 src/XF/Install/Upgrade/2020010-220a.php(307): XF\Install\Upgrade\AbstractUpgrade->alterTable()
#7 src/XF/Cli/Command/Upgrade.php(136): XF\Install\Upgrade\Version2020010->step13()
#8 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\Upgrade->execute()
#9 src/vendor/symfony/console/Application.php(987): Symfony\Component\Console\Command\Command->run()
#10 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand()
#11 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun()
#12 src/XF/Cli/Runner.php(76): Symfony\Component\Console\Application->run()
#13 cmd.php(15): XF\Cli\Runner->run()
#14 {main}


Request state​


array(1) {
["cli"] => string(18) "cmd.php xf:upgrade"
}

Error 3.
Server error log



  • ErrorException: Renamed table xf_api_login_token to xf_api_login_token__conflict to avoid schema conflict
  • src/XF/Error.php:75

  • Generated by: Unknown account
  • Aug 9, 2020 at 11:48 AM


Stack trace​


#0 src/XF.php(189): XF\Error->logError()
#1 src/XF/Db/Schema/Create.php(72): XF::logError()
#2 src/XF/Db/Schema/AbstractDdl.php(147): XF\Db\Schema\Create->getQueries()
#3 src/XF/Db/SchemaManager.php(186): XF\Db\Schema\AbstractDdl->apply()
#4 src/XF/Install/InstallHelperTrait.php(680): XF\Db\SchemaManager->createTable()
#5 src/XF/Install/Upgrade/2020010-220a.php(45): XF\Install\Upgrade\AbstractUpgrade->createTable()
#6 src/XF/Cli/Command/Upgrade.php(136): XF\Install\Upgrade\Version2020010->step1()
#7 src/vendor/symfony/console/Command/Command.php(255): XF\Cli\Command\Upgrade->execute()
#8 src/vendor/symfony/console/Application.php(987): Symfony\Component\Console\Command\Command->run()
#9 src/vendor/symfony/console/Application.php(255): Symfony\Component\Console\Application->doRunCommand()
#10 src/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun()
#11 src/XF/Cli/Runner.php(76): Symfony\Component\Console\Application->run()
#12 cmd.php(15): XF\Cli\Runner->run()
#13 {main}


Request state​


array(1) {
["cli"] => string(18) "cmd.php xf:upgrade"
}

1596969608483.webp


And the style is completely broken.
 
It won’t be anything to do with master data but you do need to check and resolve any outdated templates.

I’m certain the style issues will go away if your style is updated or if you create a new default style with no parent.

The column and table conflicts are more concerning.

Did you experience any issues while upgrading or do anything else that may have meant running the upgrader more than once during upgrade?

Unless you already had add-ons that provided similar functionality to the tables involved in those conflicts, which seems unlikely.
 
That was the 2nd reinstallation.
Unfortunately, I cannot download the beta version to manually upload the files to the server. Only the upgrade from the ACP works. Here the setup reports that a file has unexpected content, but unfortunately doesn't tell me which one it is. :(
 
Why is it a 2nd reinstallation? Is this on a live site or a test site? Why can't you download the beta version manually?

Going to Tools > File health check should tell you which files are missing/unexpected.
 
Why is it a 2nd reinstallation? Is this on a live site or a test site? Why can't you download the beta version manually?

Going to Tools > File health check should tell you which files are missing/unexpected.
I have an exact copy of my livesite as a test version in a password-protected subdomain. I also have a backup of this. I restore this if problems occur during or after the upgrade that I cannot fix. I upgraded to XF 2.2 B2 this morning. then I merged all the outdated templates.
After the style still looked so shot, I restored the backup and upgraded from 2.1 to 2.2 Beta 2 again.

After your hint I deactivated all addons, restarted MySQL and the Apache to avoid problems with the cache. The mistake was still the same. I am now repeating the upgrade for the third time.

I cannot download a beta from xenforo.com because only the current version (2.1.x) and the current importer are displayed for download. (Also no scrolling possible)

What amazes me is that these problems did not arise when upgrading from XF 2.1 to XF 2.2 B1.
 
Click "Download XenForo" then you can pick which version you want to download.

For obvious reasons we only list the latest stable version and we will default to that in the list but as demonstrated by @mcatze it is there.
 
For obvious reasons we only list the latest stable version and we will default to that in the list
It's a little crazy.
That I have to click again on "Downloads" in front of the name of the first download in the list of the two offered downloads to conjure up another list, I have not experienced that either ;)
Now it worked. Are there more such Easter Eggs in XF?
 
Ok...

OK.
New attempt to upload all files from XF 2.2 Beta 2 again. All addons in the ACP and in the config.php deactivated.
No more errors with missing or incomplete data.
Only the error message with the "renamed ... to avoid schema conflict"

But otherwise the same result as in the graphic above.

How do I find out what the following strange error message refers to?
1596984216676.png


Where is Line: 12156 near core.less?

Or whats this?
Previous Less_Exception_Compiler: .m-blockAligner is undefined in anonymous-file-0.less - src/vendor/oyejorge/less.php/lib/Less/Tree/Mixin/Call.php:149
 
Last edited:
As I said, it will be an outdated or badly merged template. Specifically I think it's probably your setup.less template.

You either need to install an XF 2.2 compatible style, resolve any outdated templates, or revert any changes to the setup.less template.
 
As I said, it will be an outdated or badly merged template. Specifically I think it's probably your setup.less template.

You either need to install an XF 2.2 compatible style, resolve any outdated templates, or revert any changes to the setup.less template.
Resetting setup.less and then merging it has solved the problem!

Thanks for the hint :D
 
Top Bottom