Hey there,

In https://git.drupalcode.org/project/views_bulk_operations/-/commit/01cee7... you refactored a bunch of classes and changed the notation of parameters in the __construct methods. But in the same process, you marked them as readonly which provides some BC issues.

We noticed ConfigureAction to be problematic in cases in which the action plugin config form uses a more complex, ajax based logic which serializes and unserializes the form. And when this happens, it errors out with:

Error: Cannot initialize readonly property Drupal\views_bulk_operations\Form\ConfigureAction::$tempStoreFactory from scope Drupal\Core\Form\FormBase in Drupal\Core\Form\FormBase->__wakeup() (line 81 of /var/www/html/build/core/lib/Drupal/Core/DependencyInjection/DependencySerializationTrait.php).

...namely, it cannot reinstantiate the form because the parameter is now readonly and cannot be set from the parent class which uses the dependency serialization trait. So we need to add it also to this class or remove the readonly support.

CommentFileSizeAuthor
#4 3482226-4.patch837 bytesupchuk
#2 3482226-2.patch658 bytesupchuk
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

upchuk created an issue. See original summary.

upchuk’s picture

Status: Needs work » Needs review
StatusFileSize
new658 bytes
graber’s picture

Status: Needs review » Needs work

Cool but let's also add a comment why it's needed so someone will not remove it in the future by mistake.

upchuk’s picture

Status: Needs work » Needs review
StatusFileSize
new837 bytes

Here you go. Are there no tests running?

graber’s picture

I think there's no testing of patches now, only for old branches that had it set previously, and it's impossible to set it on new branches anymore, you'd have to set up a MR. I don't think this needs a test though.

graber’s picture

I'll reword it a bit tomorrow so it's clear this ahppens during AJAX requests on config forms and commit.

onfire84’s picture

Status: Needs review » Reviewed & tested by the community

Thx, run today in the same issue. Patch #4 works for me.

  • graber committed 39e337a4 on 4.3.x
    Issue #3482226 by upchuk: Dependency serialization trait missing on...
graber’s picture

Status: Reviewed & tested by the community » Fixed

And of course I forgot. Thanks for commenting and triggering a notification.

graber’s picture

harlor’s picture

Status: Fixed » Needs review

Great! - @graber are you planning to release a 4.3.2 for this?

harlor’s picture

Status: Needs review » Fixed

Sorry accidentally changed status...

graber’s picture

Yes, let's just wait a couple of days, maybe there'll be more findings.

Status: Fixed » Closed (fixed)

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