Problem/Motivation

Site crashes with a WSOD after updating to 3.0.0 from 8.x-1.0-rc4

These are the messages that show in the log together with the error after switching back to 1.x

Warning: Undefined array key "path" in _vuejs_vue_generate_library_definition() (Zeile 59 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Undefined array key "petitevue" in vuejs_library_info_build() (Zeile 37 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 75 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 75 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 85 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 88 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 89 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Uninitialized string offset 0 in Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension() (Zeile 226 in /web/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php).:
Warning: Undefined array key "path" in _vuejs_vue_generate_library_definition() (Zeile 59 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Undefined array key "petitevue" in vuejs_library_info_build() (Zeile 37 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 75 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 75 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 85 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 88 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Trying to access array offset on value of type null in _vuejs_petitevue_generate_library_definition() (Zeile 89 in /web/modules/contrib/vuejs/vuejs.module).:
Warning: Uninitialized string offset 0 in Drupal\Core\Asset\LibraryDiscoveryParser->buildByExtension() (Zeile 226 in /web/core/lib/Drupal/Core/Asset/LibraryDiscoveryParser.php).:

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork vuejs-3404816

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
anybody’s picture

What I can see is, that the config schema is slightly different in 1.x and 3.x but there's no .install files with update hook to update existing configuration:
https://git.drupalcode.org/project/vuejs/-/blob/3.x/config/schema/vuejs....

The install config is also slightly different:
https://git.drupalcode.org/project/vuejs/-/tree/3.x/config/install?ref_t...

So I think the missing update hook is the reason for this.

anybody’s picture

Title: Incomplete library definition for definition 'vue_router' in extension 'vuejs' » Incomplete library definition for definition 'vue_router' in extension 'vuejs' upgrading from 8.x-1.x to 3.x
anybody’s picture

I think best would be to reset the config to install defaults when upgrading to 3.x.

I found this snippet in the vuejs.install file of 8.x-1.x:

/**
 * Implements hook_update_N().
 */
function vuejs_update_8001(&$sandbox) {
  $module = basename(__FILE__, '.install');
  \Drupal::service('config.installer')->installDefaultConfig('module', $module);
  \Drupal::messenger()->addStatus('Module vuejs Update # 8001 () was executed successfully.');
}

guess wo could do the same, but of course first check, if this needs to be done.

anybody’s picture

Assigned: Unassigned » minoroffense
Status: Active » Needs review

Here we go :) I think this should fix the error and do what's possible.

minorOffense made their first commit to this issue’s fork.

minoroffense’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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