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

Building Theme CSS Fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 3.5.3
    • Themes
    • None
    • MOODLE_35_STABLE
      • Disable the xdebug in your environment [OR]
      • Set in your php.ini: xdebug.max_nesting_level setting = 512

      After upgrading to Moodle 3.5.3 from Moodle 3.1.3 there was an adhoc task added "\core\task\build_installed_themes_task" which is the same as running this CLI command "/admin/cli/build_theme_css.php".

      This task and CLI script are failing with the following errors:

      Execute adhoc task: core\task\build_installed_themes_task
      ... started 13:38:14. Current memory use 48.4MB.
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      ... used 4 dbqueries
      ... used 29.244378089905 seconds
      Adhoc task failed: core\task\build_installed_themes_task,Unexpected end of document [line no: 43155]

      When adding some extra error logging to see which themes are failing and running the script with verbosity, the below is the output.

       

      root@SERVER:~# sudo -u www-data php /var/www/moodle/admin/cli/build_theme_css.php -v
      == Build theme css ==
      No themes specified. Finding all installed themes.
      Checking that each theme is correctly installed...
      Building CSS for themes: boost, bootstrapbase, clean, essential, more
      parsing theme boost
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      parsing theme boost
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      parsing theme bootstrapbase
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      parsing theme clean
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      PHP Notice: Undefined offset: 0 in /var/www/moodle/lib/php-css-parser/Parser.php on line 418
      Default exception handler: Exception - Unexpected end of document [line no: 43155] Debug:
      Error code: generalexceptionmessage
      * line 113 of /lib/php-css-parser/Parser.php: Sabberworm\CSS\Parsing\SourceException thrown
      * line 197 of /lib/php-css-parser/Parser.php: call to Sabberworm\CSS\Parser->parseList()
      * line 119 of /lib/php-css-parser/Parser.php: call to Sabberworm\CSS\Parser->parseAtRule()
      * line 96 of /lib/php-css-parser/Parser.php: call to Sabberworm\CSS\Parser->parseListItem()
      * line 87 of /lib/php-css-parser/Parser.php: call to Sabberworm\CSS\Parser->parseList()
      * line 82 of /lib/php-css-parser/Parser.php: call to Sabberworm\CSS\Parser->parseDocument()
      * line 1904 of /lib/outputlib.php: call to Sabberworm\CSS\Parser->parse()
      * line 1123 of /lib/outputlib.php: call to theme_config->post_process()
      * line 208 of /lib/outputlib.php: call to theme_config->get_css_content()
      * line 117 of /admin/cli/build_theme_css.php: call to theme_build_css_for_themes()
      !!! Exception - Unexpected end of document [line no: 43155] !!!
      

       

      I've tried to investigate where it might be happening but I'm unsure. Our current theme "essential" is working correctly though.

            Unassigned Unassigned
            agrowe Alex Rowe
            Votes:
            1 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.