'Minimal' install profile.
Fill DB settings with my local MySQL info.
Default country: Spain
Timezone: Europe/Madrid
Unchecked "Check for updates automatically"

Message Notice: Undefined index: minimal in system_list() (line 194 of core/includes/module.inc). appears above "Congratulations, you installed Drupal!" at finish page.

Using latest 8.x (594be7b)

Files: 
CommentFileSizeAuthor
#7 drupal8.installer-notices.7.patch413 bytessun
PASSED: [[SimpleTest]]: [MySQL] 42,251 pass(es).
[ View ]

Comments

Yeah, I received a similar error in Spark w/ all of our contributed modules:

• Notice: Undefined index: admin_icons in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: aloha in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: bunnypoint in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: caption in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: gridbuilder in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: layout in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: libraries in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: region in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: spark in system_list() (line 194 ofcore/includes/module.inc).
• Notice: Undefined index: spark_demo in system_list() (line 194 ofcore/includes/module.inc).

Here's the surrounding code from system_list():

      $enabled_modules = config('system.module')->get('enabled');
      $module_files = state()->get('system.module.files');
      foreach ($enabled_modules as $name => $weight) {
        // Build a list of all enabled modules.
        $lists['module_enabled'][$name] = $name;
        // Build a list of filenames so drupal_get_filename can use it.
        $lists['filepaths'][] = array(
          'type' => 'module',
          'name' => $name,
          'filepath' => $module_files[$name], ### LINE 194.
        );
      }

This must be a difference between the interactive and non-interactive installer, since the non-interactive installer does not throw these notices (all web tests are using the non-interactive installer to install Drupal now).

There's a popular spot in the installer with regard to that, and it happens to be on the install configure form -- the JavaScript on that page triggers a HTTP request to the freshly installed site, and that's probably the cause.

We should try to validate this by triggering a form validation error on the final install configure form; e.g., by leaving out a #required form field, so the form gets re-rendered. If the notices are triggered by that page/form, then they will appear on the subsequently rendered form. If not, then we need to search elsewhere for the problem.

I'm seeing the same thing as the OP in the current HEAD (cb1248b).

Title:Minimal profile install displays "Notice: Undefined index: minimal in system_list() (line 194 of core/includes/module.inc)"PHP notices thrown in interactive installer
Priority:Normal» Major

Priority:Major» Normal

Eh, they're just notices. Not worth holding up features.

Triggering a validation error on that form is harder than it looks, due to the HTML5 required attribute + email field. :) I managed to do it by entering a username of "*&@((!@", and it does indeed then trigger the notice on the configuration form. Conveniently, it does this consistently every time the form is submitted with an error, making it a much shorter path for debugging.

system_list() gets called twice on this page. The first time, minimal is not in $module_files, the second time it is.

I threw in a:

if (!isset($module_files[$name])) {
var_dump(debug_backtrace());
}

and this gave me:

system_list -> registerBundles -> initializeBundles -> boot -> install_bootstrap_full -> install_run_task -> install_run_tasks -> install_drupal

The system_list() that's working fine has this callstack:

system_list -> module_list -> module_load_all_includes -> drupal_get_complete_schema -> drupal_get_schema -> install_configure_form -> call_user_func_array -> drupal_retrieve_form -> drupal_build_form -> install_run_task -> install_run_tasks -> install_drupal

Status:Active» Needs review
StatusFileSize
new413 bytes
PASSED: [[SimpleTest]]: [MySQL] 42,251 pass(es).
[ View ]

Status:Needs review» Needs work

Nope. :\ Doesn't solve the problem.

Status:Needs work» Active

Worth a try :)

So the actual problem is that config system.module is not empty, while state system.module.files is empty.

system.module.files is populated by system_rebuild_module_data().

It may not get populated, because the database is not available yet when system_rebuild_module_data() is invoked by the installer.

When installing with verbose error_level, the pretty-formatted backtrace is this:

Error message

Notice: Undefined index: minimal in system_list() (line 194 of core\includes\module.inc).

system_list('module_enabled')
Drupal\Core\DrupalKernel->registerBundles()
Symfony\Component\HttpKernel\Kernel->initializeBundles()
Symfony\Component\HttpKernel\Kernel->boot()
install_bootstrap_full(Array)
install_run_task(Array, Array)
install_run_tasks(Array)
install_drupal()

Just for the record: I *love* the new pretty/verbose error messages. :)

happening for me. Hope I can help.

same here, only happening with the minimal profile.

Issue tags:+Spark

Tagging with Spark.

Based on the backtrace in #10, it is possible that my patch in #1798732: Convert install_task, install_time and install_current_batch to use the state system might resolve this issue.

Sadly, no.

Thanks for testing.

So I recently tested the interactive installer for #1798732: Convert install_task, install_time and install_current_batch to use the state system and some others issues like hell (I still need to defragment my disk ;)), and apparently, I never saw this PHP notice in my testing.

However, I am perfectly able to reproduce the PHP notice.

Apparently, there's a single, subtle difference between all the testing I performed for aforementioned issue(s) and the environment in which I can reproduce the PHP notice:

As documented in The Ultimate Guide for Contributing to Core™, the essential difference between my tests is a /scratch subdirectory — i.e., the PHP notice appears when installing Drupal NOT in a subdirectory.

Anyone able to confirm? :) Or am I on crack again? ;)

EDIT: Minor clarification: The testbot installs Drupal in a subdirectory, too. So that would be 100% in line with this.

No, sadly, I've been installing with subdirectories all along. :( And also tested a http://drupal8.loc/ install and same deal.

I can try and check #1798732: Convert install_task, install_time and install_current_batch to use the state system again today, since I was a bit distracted at a conference when I tried it before.

Hm. Okay, then perhaps one additional, subtle difference which I did not check myself yet:

Pre-existing settings.php + pre-existing active config directory?

Fact is, all of my /scratch tests were performed in a completely empty environment (as I have a special reinstall.php script that nukes the entire environment before redirecting to install.php), and within that environment, I never saw the PHP notice.

But to clarify again, just today I saw the PHP notice myself, after re-installing my "master" D8 site (i.e., not in a subdirectory), and without my reinstall.php (i.e., with pre-existing config in the active config directory).

So I'm definitely able to reproduce this issue, just not exactly sure how and when exactly...

When I'm testing Spark (which is how I discovered this error to begin with), it's a completely fresh installation every single time. I drush make build-spark.make foo to download + install, and then sudo rm -rf foo to start over. So definitely no pre-existing config, settings.php, any of that.

I had briefly added the patch from #1798732: Convert install_task, install_time and install_current_batch to use the state system on Saturday or whatever day that was, and it didn't seem to make a difference. I'll re-add it presently and will run another test now.

Correction: I'll have a few meetings and then debug some stuff and then have some more meetings and then run a test. ;)

Even with the patch applied, still getting all of the notices in Spark. What's interesting is they're now happening *twice*, and I believe that wasn't the case before adding the install_task patch:

Notice: Undefined index: aloha in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: caption in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: libraries in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: spark in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: aloha in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: caption in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: libraries in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: spark in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: aloha in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: caption in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: libraries in system_list() (line 196 of core/includes/module.inc).
Notice: Undefined index: spark in system_list() (line 196 of core/includes/module.inc).

Status:Active» Fixed

This is no longer happening on the latest dev release, so presumably something in all the various bootstrap/module/extension refactoring stuff cleaned this up.

Automatically closed -- issue fixed for 2 weeks with no activity.