• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 4.x Series
    • Bug
    • Less_Exception_Compiler: error evaluating function `min` incompatible types index: 86321

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: Less_Exception_Compiler: error evaluating function `min` incompatible types index: 86321

    • Issue Tools
      • View Changes
    1. issueid=5648 February 14, 2019 7:17 PM
      hollosch hollosch is offline
      Senior Member
      Less_Exception_Compiler: error evaluating function `min` incompatible types index: 86321

      Less_Exception_Compiler: error evaluating function `min` incompatible types index: 86321 src/vendor/oyejorge/less.php/lib/Less/Tree/Call.php:80
      Generiert von: Unbekanntes Konto 15. Februar 2019 um 00:10
      Stack-Trace
      #0 src/vendor/oyejorge/less.php/lib/Less/Tree/Expression.php(52): Less_Tree_Call->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(394): Less_Parser->getCss()
      #7 src/XF/CssRenderer.php(342): XF\CssRenderer->renderToCss('public:vw_searc...', '// Note that th...')
      #8 src/addons/vw/vw/XF/CssRenderer.php(39): XF\CssRenderer->renderTemplate('public:vw_searc...', NULL, true)
      #9 src/XF/CssRenderer.php(250): vw\vw\XF\CssRenderer->renderTemplate('public:vw_searc...', NULL)
      #10 src/XF/CssRenderer.php(116): XF\CssRenderer->renderTemplates(Array, Array, Array)
      #11 src/XF/CssWriter.php(53): XF\CssRenderer->render(Array)
      #12 css.php(30): XF\CssWriter->run(Array, 58, 2, '77fc451373e85d3...')
      #13 {main}
      Status der Anfrage
      array(4) {
      ["url"] => string(546) "/css.php?css=public%3Abb_code.css%2Cpublic%3Ath_nodeStylin g_nodes.58.less%2Cpublic%3Auix_megaMenu.less%2Cpublic%3Av w_attach.less%2Cpublic%3Avw_base.less%2Cpublic%3Avw_bbcod e.less%2Cpublic%3Avw_block.less%2Cpublic%3Avw_content.les s%2Cpublic%3Avw_icon.less%2Cpublic%3Avw_list.less%2Cpubli c%3Avw_popup.css%2Cpublic%3Avw_search.less%2Cpublic%3Avw_ section.less%2Cpublic%3Avw_sidebar.less%2Cpublic%3Avw_tab .css%2Cpublic%3Avw_title.less%2Cpublic%3Aextra.less%2Cpub lic%3Avw_additional.less&s=58&l=2&d=1550189270&k=77fc4513 73e85d30e8eca726a61da94d07708c4a"
      ["referrer"] => string(44) "https://regio-portal.wiki/wiki/Holger_Schrag"
      ["_GET"] => array(5) {
      ["css"] => string(398) "public:bb_code.css,public:th_nodeStyling_nodes.58.less,p ublic:uix_megaMenu.less,public:vw_attach.less,public:vw_b ase.less,public:vw_bbcode.less,public:vw_block.less,publi c:vw_content.less,public:vw_icon.less,public:vw_list.less ,public:vw_popup.css,public:vw_search.less,public:vw_sect ion.less,public:vw_sidebar.less,public:vw_tab.css,public: vw_title.less,public:extra.less,public:vw_additional.less "
      ["s"] => string(2) "58"
      ["l"] => string(1) "2"
      ["d"] => string(10) "1550189270"
      ["k"] => string(40) "77fc451373e85d30e8eca726a61da94d07708c4a"
      }
      ["_POST"] => array(0) {
      }
      }
    Issue Details
    Issue Number 5648
    Issue Type Bug
    Project VaultWiki 4.x Series
    Category Styling / CSS
    Status Forum Bug
    Priority 3 - Loss of Functionality
    Affected Version 4.1.0 Alpha 2
    Fixed Version (none)
    Milestone (none)
    Software DependencyXenForo 2.x
    License TypePaid
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. February 15, 2019 1:46 PM
      pegasus pegasus is offline
      VaultWiki Team
      This occurs because your custom style has set rem and em values in the basic text font-size properties. Many add-ons, including VaultWiki (see public:vw_search.less), will try to calculate font and element sizes relative to other properties by using LESS calculations, for example:
      Code:
      @_inputHeight: (@xf-input--font-size * @xf-lineHeightDefault) + xf-default(@xf-input--border-width, 0);
      @_buttonHeight: (@xf-buttonCta--font-size * @xf-lineHeightDefault) + xf-default(@xf-buttonCta--border-width, 0);
      @_sameHeight: min(@_buttonHeight, @_inputHeight);
      In particular this is useful for forcing multiple elements to be the same size as each other even if they use different styles such as @xf-input appearing next to @xf-buttonCta. (This example is reduced for the purposes of illustration. Real world usage, such as that in public:vw_search.less, may include other properties such as borders and/or padding in the calculation).

      However, XenForo's implementation of the LESS parser appears to be unable to perform some calculations using rem and em as the base for some reason.

      I still need to do more testing to confirm, but XenForo may need to update its LESS parser mixins to be able to perform math against rem and em (min fails here, if the value is not corrupted earlier).

      Until a solution is available, I would advise you to use the wiki option to force a style that only uses px in its base properties.
      Reply Reply  
    2. February 15, 2019 6:32 PM
      pegasus pegasus is offline
      VaultWiki Team
      After investigating this thoroughly, I do not recommend using rem or em in style properties for any number-related properties. While rem in font-size properties breaks the vw_search.less template, rem in border or padding properties breaks core XenForo templates.

      XenForo's LESS parser is based on an open source project that has bugs handling relative values in the min/max and possibly other math functions, and that parser is an old version which does not support writing custom min/max/convert mixins to work around the problem. The project was abandoned several years ago so there is no hope of getting them to fix the problem or add support for features that could have helped. Unless XenForo devs can update the LESS parser themselves, fixing the problem with rem/em and min/max, you should either update your style to use px values (as in the default style), or you should avoid that style.

      In the next release, we work around this particular case in VaultWiki by using fake style properties for the min/max inputs that appear in our templates, processing the rem->px conversion in PHP and storing it in a one-purpose style property used only by our one instance of min. There is no reliable native LESS function for performing this conversion, at least none that is supported by the abandoned LESS parser. Although you will notice vw_search.less works again, the underlying problem is not fixed. It should be addressed by the style author in the short term (to avoid rem/em) and possibly XenForo in the long term (to make min/max+rem/em work and add support for mixins as functions).
      Reply Reply  
    3. February 22, 2019 6:07 AM
      hollosch hollosch is offline
      Senior Member
      I created a support ticket at the style authors page.
      Reply Reply  
    4. February 28, 2019 6:02 AM
      hollosch hollosch is offline
      Senior Member
      This is the answer. What's your opinion?

      Reply Reply  
    5. February 28, 2019 11:49 AM
      pegasus pegasus is offline
      VaultWiki Team
      VaultWiki no longer calculates values based directly on those style properties in the next alpha (it uses an intermediate step in PHP to avoid the issue). This relates to suggestion 1. However in the short term this will not help you.

      In the mean time, as mentioned, you will have to update your style (suggestion 2). You should either follow 2a&b from your post above, or customize the vw_search.less template for the affected styles so that the calculations at the top of the template use hardcoded pixel values of your choosing rather than @xf style properties.
      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 12:30 PM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.