'minifyhtml' is not a supported key.

Created on 2 March 2024, 9 months ago
Updated 28 June 2024, 5 months ago

Problem/Motivation

Unable to use Caching, Aggregate CSS and Aggregate JavaScript, or Minifyhtml due to Error

Steps to reproduce

  1. Select Page caching, Aggregate CSS files, Aggregate JavaScript files, or Minifyhtml on the Performance page
  2. Click Save configuration

Settings are not saved, and Error message 'minifyhtml' is not a supported key is displayed. There are no error messages in the logs, only at the top of the page after clicking Save configuration.

Uninstalling Minifyhtml does not correct the issue, the error is still displayed even if Minifyhtml is not installed.
Clearing the cache does not help. I just updated to core 10.2.3 but I'm not sure if page caching was working before this latest update.

Minifyhtml 2.0.3
Drupal Core 10.2.3

πŸ› Bug report
Status

Postponed: needs info

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada jmoruzi Brantford, ON

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @jmoruzi
  • Status changed to Postponed: needs info 8 months ago
  • πŸ‡¨πŸ‡¦Canada slydevil Halifax

    Tried to reproduce this with 10.2.3 and 10.2.4 and it works for both. There must be something specific to your site that is causing the issue.

    Ping me on the #minifyhtml slack channel if you want to look into it more.

  • πŸ‡ΊπŸ‡ΈUnited States websiteworkspace

    The same error:

    'minifyhtml' is not a supported key.
    

    appeared on the Home > Administration > Configuration > Development page today while maintaining one of our sites.

  • πŸ‡ΊπŸ‡ΈUnited States websiteworkspace

    Additional notes about the problem described above:

    After uninstalling drupal/minifyhtml (2.0.4) and removing the drupal/minifyhtml code from the project ...

    The error regarding - 'minifyhtml' is not a supported key - still appears (see screenshot on drupal slack)

    [composer update run, showing drupal/minifyhtml removal]

    vendor/bin/drush state:set system.maintenance_mode 1
    composer.phar update --with-all-dependencies
    Loading composer repositories with package information
    Updating dependencies
    Lock file operations: 0 installs, 2 updates, 4 removals
      - Removing drupal/minifyhtml (2.0.4)
      - Removing drupal/minifyjs (3.0.1)
      - Removing matthiasmullie/minify (1.3.73)
      - Removing matthiasmullie/path-converter (1.1.3)
      - Upgrading mglaman/phpstan-drupal (1.2.7 => 1.2.8)
      - Upgrading phpstan/phpdoc-parser (1.26.0 => 1.27.0)
    Writing lock file
    Installing dependencies from lock file (including require-dev)
    Package operations: 0 installs, 2 updates, 4 removals
      - Downloading mglaman/phpstan-drupal (1.2.8)
      - Downloading phpstan/phpdoc-parser (1.27.0)
      - Removing matthiasmullie/path-converter (1.1.3)
      - Removing matthiasmullie/minify (1.3.73)
      - Removing drupal/minifyjs (3.0.1)
      - Removing drupal/minifyhtml (2.0.4)
      - Upgrading mglaman/phpstan-drupal (1.2.7 => 1.2.8): Extracting archive
      - Upgrading phpstan/phpdoc-parser (1.26.0 => 1.27.0): Extracting archive
    Deleting /modules/minifyjs/ - deleted
    Deleting /modules/minifyhtml/ - deleted
    Generating autoload files
    > Drupal\Core\Composer\Composer::preAutoloadDump
    vendor/bin/drush -n -y updb
    [success] No pending updates.
    vendor/bin/drush -n -y cr
    
    
  • πŸ‡¬πŸ‡§United Kingdom arcaic Milton Keynes

    Not sure what's causing this. We have it installed on a multi site system and on one of the sites we were getting this message when trying to enable css/js aggregation.

    Even after uninstalling the module we still had the issue.

    An export and search of the sites config found the following entries in the system.performance.yml file.

    minifyhtml:
    minify_html: 0

    I did a single file export of system.performance.yml, removed the minify_html settings from the file and did an single file import and was able to enable css/js aggregation.

  • πŸ‡³πŸ‡±Netherlands ifrik

    I had the same problem on Drupal 10.3, on a site that didn't have Minifyhtml installed anymore for a long time, but the lines
    minifyhtml:
    minify_html: 0
    did not get removed from system.performance.yml whenever the module was uninstalled. As a result the perfomance page could not be saved until I edited the yml file directly and imported the config.

Production build 0.71.5 2024