Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-69491

No 'fontsize' setting in Boost causes unit conflict

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.7.7, 3.8.4, 3.9.1, 3.10, 4.0
    • Fix Version/s: 3.8.5, 3.9.2
    • Component/s: Themes
    • Labels:

      Description

      In 'theme_boost_get_pre_scss' there is the code:

      $scss .= '$font-size-base: ' . (1 / 100 * $theme->settings->fontsize) . "rem !default;\n";

      which assumes that the 'fontsize' setting is in 'rem' units.  However:

      1. If a theme declares a setting of the same name (in effect to override the setting) with a non-numeric value then the error 'A non well formed numeric value encountered' happens when 'Purge all caches'.  This is because of the way that 'get_pre_scss_code' works in 'outputlib.php' and the child theme theme_config instance (referenced by $theme) is used with the Boost code 'theme_boost_get_pre_scss'.
      2. Boost has no 'fontsize' setting delaired in its 'settings.php'!

      Therefore this code is redundant and I propose it should be removed = its a bug!

      Code's been there since MDL-56511 with the string:

      $string['fontsize_desc'] = 'Enter a fontsize in %';

      stating percent and yet the code is 'rem'!  Thus a bug in MDL-56511.

       

       

        Attachments

        1. MDL-69491.jpg
          MDL-69491.jpg
          15 kB
        2. moo.zip
          19 kB

          Issue Links

            Activity

              People

              Assignee:
              gb2048 Gareth J Barnard
              Reporter:
              gb2048 Gareth J Barnard
              Peer reviewer:
              Bas Brands
              Integrator:
              Eloy Lafuente (stronk7)
              Tester:
              Anna Carissa Sadia
              Participants:
              Component watchers:
              Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Sep/20

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 35 minutes
                  1h 35m