1

My drupal 8 site is showing a experimental modules enabled warning under /admin/reports/status. I vaguely remember to have them enabled at a certain time, but I forgot where.

I don't use any of them, how can I remove the warning and disable the experimental modules again?

I have currently no experimental module enabled, but the warning is still displayed: enter image description here

2
  • And you flushed cache and did run cron already?
    – leymannx
    May 9, 2019 at 4:57
  • This can make you scratch your head, but once you know where to watch, it's "quite" easy to fix it. I admit it's not simple to imagine what is happening.
    – apaderno
    May 9, 2019 at 7:39

2 Answers 2

3

There is an experimental module that it's not shown on the screenshot given in the question: the Place Blocks module. Its .info.yml file is the following one, on Drupal 8.7.x.

name: Place Blocks
type: module
description: 'Allow administrators to place blocks from any Drupal page'
package: Core (Experimental)
version: VERSION
core: 8.x
hidden: true
dependencies:
  - drupal:block

Since it contains the hidden: true line, it isn't shown in the list of available/installed modules, in the same way modules used for the tests aren't shown.

You could ask now how it is possible to install a module that isn't shown in the list of the modules. The answer is that on Drupal 8.3.x, the module was not hidden.

name: Place Blocks
type: module
description: 'Allow administrators to place blocks from any Drupal page'
package: Core (Experimental)
version: VERSION
core: 8.x
dependencies:
  - block

Drupal 8.4.x was the first Drupal 8 branch to hide it.

As for uninstalling it, you need to edit the core/modules/block_place/block_place.info.yml file, remove the hidden: true line, or change it to hidden: false, clear the cache, visit the Extend page, and uninstall it. Be careful of not changing the line indentation for that file, as a wrong indentation can cause issues.
Since it requires to edit a module file, it could be tricky to make Drupal notice the change. I normally visit the Extend page after I edited a module file as in this case, install a core module I don't need, uninstall it, visit another page, and go back to the Extend page. At this point, I am sure Drupal caught the change I done to the module file.

1
  • That was it exactly! Thx mate :D
    – Andreas
    May 10, 2019 at 1:45
0

You can navigate to the Extend (/admin/modules) menu and look for the Core (Experimental) section, it lists all experimental modules. Note the modules, and head over to the Uninstall tab where you can disable the experimental modules you saw.

If it doesn't appear that any modules are enabled, you can inspect the critical code that triggers the alert. Namely, system_requirements() which is executing this block:

    // Warn if any experimental modules are installed.
    $experimental = array();
    $enabled_modules = \Drupal::moduleHandler()
      ->getModuleList();
    foreach ($enabled_modules as $module => $data) {
      $info = system_get_info('module', $module);
      if ($info['package'] === 'Core (Experimental)') {
        $experimental[$module] = $info['name'];
      }
    }
    if (!empty($experimental)) {
      $requirements['experimental'] = array(
        'title' => t('Experimental modules enabled'),
        'value' => t('Experimental modules found: %module_list. <a href=":url">Experimental modules</a> are provided for testing purposes only. Use at your own risk.', array(
          '%module_list' => implode(', ', $experimental),
          ':url' => 'https://www.drupal.org/core/experimental',
        )),
        'severity' => REQUIREMENT_WARNING,
      );
    }
  }

Use whatever REPL tool that works best for your workflow (e.g. drush php) to determine what/why the alert is being triggered.

3
  • Alternatively just head straight to /admin/modules/uninstall & ctl+f search for the word "experimental"
    – 100pic
    May 9, 2019 at 4:11
  • Thx for the answer, but I have none of the experimental modules installed, but still have the warning. If I remember right, I had to activate them somewhere to be visible in the first place? Or is there some other module, that uses experimental functionality without beeing listed as an experimental module?
    – Andreas
    May 9, 2019 at 4:20
  • 1
    No way to remotely debug your system (outside of speculating about cache or modules not properly removed). Inspect the underlying code that generates the alert to determine the source module that caused the error. That's the best you can do with a QA format here.
    – Shawn Conn
    May 9, 2019 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.