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
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
Comment #4
spadxiii commentedAdded 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.
Comment #5
anybodyThanks @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?
Comment #7
grevil commentedI 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.
Comment #8
grevil commentedAlright, 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!
Comment #9
anybodyComment #10
grevil commentedReadded the composer.json again, should now not run any more in issues! 😅
(But unfortunately we need it).
Comment #11
anybody@Grevil: Thanks! Switching to ckeditor5 means, this needs Drupal
^9.5 || ^10and 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.
Comment #12
grevil commentedOk, let's only add the update hook changes here and create seperate issues, for:
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.
Comment #13
anybody@Grevil: Perfect, I agree!
Comment #14
grevil commentedComment #15
grevil commentedOk, 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.
Comment #17
grevil commentedHere is the ckeditor5 issue #3422646: The micon_ckeditor module is not compatible with Drupal 10 (ckeditor5).