Problem/Motivation

We can't upgrade past micon 2.1.0-beta0 because the site is still running Drupal 9.3.x at this point.

When we updated to micon 2.1.0-beta0 and ran "drush updb" on the site, the following output results

>  [notice] Update started: micon_update_8001
>  [error]  implode(): Argument #2 ($array) must be of type ?array, string given
>  [error]  Update failed: micon_update_8001
 [error]  Update aborted by: micon_update_8001
 [error]  Finished performing updates.

Steps to reproduce

Not 100% sure since I'm not sure what might causing the message. I don't see any configuration for the module.

We do have the Micon Link sub-module enabled in addition to the Micon module.

Issue fork micon-3303417

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

greggmarshall created an issue. See original summary.

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

spadxiii’s picture

Status: Active » Needs review

Added a small fix in a merge request. In our case, the value was always empty, so didn't see a need to update it in that case.

Please review and check if this is good enough for the upgrade.

anybody’s picture

Assigned: Unassigned » grevil

Thanks @SpadXIII, unsure if there's a better solution, but thanks for the info that this can happen.

@Grevil could you have a look? Do you still remember this part?

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

grevil’s picture

I thought I just commented this issue extensively, but for some reason it's gone, so here we go again with a more simple explanation:

Your problem is fairly weird, as this update hook is used to update to the new storage structure of "archive". Before, we used an array to store the zip archive data inside a Michon entity, but now we are using a string. So you, having a string as the archive entry is fairly weird, but doesn't break any module functionalities, since this attribute is only used on Micon entity creation.

An empty check should be more then enough here.

grevil’s picture

Version: 2.1.0-beta0 » 2.x-dev

Alright, should all be green now!

The test was deprecated since ckeditor 4 was called "ckeditor" and the new D10 ckeditor ist called "ckeditor5" internally. This issue has not arisen yet, since we currently do not have a 2.1.x D10 test. I'll change this immediatly!

anybody’s picture

Status: Needs review » Needs work
grevil’s picture

Status: Needs work » Needs review

Readded the composer.json again, should now not run any more in issues! 😅

(But unfortunately we need it).

anybody’s picture

Status: Needs review » Needs work

@Grevil: Thanks! Switching to ckeditor5 means, this needs Drupal ^9.5 || ^10 and we have to declare it as dependency in the .info.yml.

This module will NOT be compatible with the old ckeditor4 anymore then! I'm unsure how to proceed here, this is quite a heavy step and ckeditor5 isn't yet that widely used in Drupal 9, while forced in Drupal 10.

grevil’s picture

Ok, let's only add the update hook changes here and create seperate issues, for:

  • composer.json leads to tests not running inside issue branches
  • create a seperate Drupal 10 version with ckeditor5 support and fix the tests accordingly

Since micon_ckeditor is a submodule and therefore tied to the main module, we should not make this submodule <= D9.5 compatible if the main module isn't.

anybody’s picture

@Grevil: Perfect, I agree!

grevil’s picture

Title: Error during "drush updb" » Fix tests and error during "drush updb"
grevil’s picture

Assigned: grevil » Unassigned
Status: Needs work » Reviewed & tested by the community

Ok, let's only push the test and update hook fix for now. The module is currently not Drupal10 ready (although it says so). This should be resolved in a seperate issue.

grevil’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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