1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Server Error Log - Invalid Math expression

Discussion in 'Troubleshooting and Problems' started by Tyluur, Oct 19, 2016.

  1. Tyluur

    Tyluur Member

    Today I transferred my forum from a previous domain/database over to my new domain/database/host. The change was successful and I was able to get all threads/topics/usergroups etc synced over. However I ran into this error when I did actions like delete a usergroup or install a new theme. When I installed a new theme, I got a white page instead of the new page when I tried changing over to it.

    Error info:

    XenForo_Template_Compiler_Exception: message.css - Line 27: Invalid math expression - library/XenForo/Template/Compiler.php:991
    Stack trace:

    #0 /dir/library/XenForo/Template/Compiler/Function/Calc.php(189): XenForo_Template_Compiler->getNewCompilerException(Object(XenForo_Phrase))
    #1 /dir/library/XenForo/Template/Compiler/Function/Calc.php(55): XenForo_Template_Compiler_Function_Calc->_parseMathExpression(Object(XenForo_Template_Compiler), 'intval(?) + 5', Array)
    #2 /dir/library/XenForo/Template/Compiler.php(700): XenForo_Template_Compiler_Function_Calc->compile(Object(XenForo_Template_Compiler), 'calc', Array, Array)
    #3 /dir/library/XenForo/Template/Compiler.php(576): XenForo_Template_Compiler->compileFunction('calc', Array, Array)
    #4 /dir/library/XenForo/Template/Compiler.php(509): XenForo_Template_Compiler->compileSegment(Array, Array)
    #5 /dir/library/XenForo/Template/Compiler.php(372): XenForo_Template_Compiler->compileSegments(Array)
    #6 /dir/library/XenForo/Model/Template.php(1601): XenForo_Template_Compiler->compileParsed(Array, 'message.css', 7, 0)
    #7 /dir/library/XenForo/Model/Template.php(1379): XenForo_Model_Template->compileAndInsertParsedTemplate(1492, Array, 'message.css', 7)
    #8 /dir/library/XenForo/Model/Template.php(1329): XenForo_Model_Template->compileTemplateInStyleTree(Array)
    #9 /dir/library/XenForo/Model/Template.php(1268): XenForo_Model_Template->compileNamedTemplateInStyleTree('message.css', 7)
    #10 /dir/library/XenForo/Deferred/Template.php(36): XenForo_Model_Template->compileAllTemplates(6.62271595001, 0, 571)
    #11 /dir/library/XenForo/Model/Deferred.php(295): XenForo_Deferred_Template->execute(Array, Array, 6.62271595001, 'Rebuilding... T...')
    #12 /dir/library/XenForo/Model/Deferred.php(429): XenForo_Model_Deferred->runDeferred(Array, 6.62271595001, 'Rebuilding... T...', false)
    #13 /dir/library/XenForo/Model/Deferred.php(374): XenForo_Model_Deferred->_runInternal(Array, 6.62271785736, 'Rebuilding... T...', false)
    #14 /dir/library/XenForo/ViewRenderer/Abstract.php(352): XenForo_Model_Deferred->run(true, 6.62271785736)
    #15 /dir/library/XenForo/ViewRenderer/HtmlAdmin.php(130): XenForo_ViewRenderer_Abstract::hasManualDeferredToRun(true)
    #16 /dir/library/XenForo/FrontController.php(637): XenForo_ViewRenderer_HtmlAdmin->renderContainer(Object(XenForo_Template_Admin), Array)
    #17 /dir/library/XenForo/FrontController.php(158): XenForo_FrontController->renderView(Object(XenForo_ControllerResponse_Error), Object(XenForo_ViewRenderer_HtmlAdmin), Array)
    #18 /dir/admin.php(13): XenForo_FrontController->run()
    #19 {main}
    Request state:

    array(3) {
      ["url"] => string(52) "http://dir/forums/admin.php?tools/run-deferred"
      ["_GET"] => array(1) {
       ["tools/run-deferred"] => string(0) ""
      ["_POST"] => array(3) {
       ["redirect"] => string(41) "http://dir/forums/admin.php?styles/"
       ["execute"] => string(1) "1"
       ["_xfToken"] => string(8) "********"
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What method did you use to transfer the database to the new server? Shell commands are the most reliable method:


    Make sure the new server meets XenForo's requirements:


    Try reverting the template named in the error:

    Admin CP -> Appearance -> Templates -> message.css

    You can also try deleting the deferred tasks:

  3. Tyluur

    Tyluur Member

    Hey thanks for the reply,

    To transfer to the new server I simply exported the sql database and imported it over on my new server using phpmyadmin. Then I changed the info in config.php.


    These requirementes are met.

    I've just ran the query to empty the deferred queue, and then I tried to import the new style and got the same error.

    I'll now upgrade to the newest xenforo and see if it'll make a change. I'm on 1.5.1. right now.
  4. Mike

    Mike XenForo Developer Staff Member

    You've most likely upgrading to a style designed for a more recent version; there's something supported in 1.5.9 that isn't supported in 1.5.1 that can trigger an error like that. So upgrading would be the way to resolve it.
  5. Tyluur

    Tyluur Member

    Upgraded and solved.

    Req. Close
  6. Degrinch

    Degrinch Active Member

    If upgrading is not an available option at the time?
  7. Mike

    Mike XenForo Developer Staff Member

    You'd need to use a style that's designed for your specific XF version (or at least a version prior to one that uses the new option).
  8. Degrinch

    Degrinch Active Member

    one word, 4 letters, they bounce... what are they?

Share This Page