When using Inline Entity Form widget on a Moderated type I get.
LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep() (line 1433 of /var/www/d8_scheduled_updates/core/lib/Drupal/Core/Database/Connection.php).
When click "Add new Entity" on the Inline Entity Form widget.
If I think the problem is in \Drupal\workbench_moderation\EntityTypeInfo::bundleFormAlter
// Submit handler to redirect to the
$form['actions']['submit']['#submit'][] = [$this, 'bundleFormRedirect'];
The $this reference.
If that line is commented out you can add a new entity via the IEF widget(but of course the form isn't redirect)
Comment | File | Size | Author |
---|---|---|---|
#10 | workbench_moderation-bug-2650388-10.patch | 1.38 KB | becw |
#9 | workbench_moderation-bug-2650388-8.patch | 702 bytes | becw |
Comments
Comment #2
becw CreditAttribution: becw at Palantir.net for Acquia commentedComment #4
becw CreditAttribution: becw at Palantir.net for Acquia commentedOh, this causes all kinds of issues. Any ajax on these forms is broken right now. Here's a patch!
Comment #9
becw CreditAttribution: becw at Palantir.net for Acquia commentedComment #10
becw CreditAttribution: becw at Palantir.net for Acquia commentedCrell, if you prefer the static version, here you are. Enjoy (?!?).
Comment #11
snufkin CreditAttribution: snufkin at Acquia commentedFrom a functional standpoint this resolves a related issue for me, where the AJAX call to add paragraphs to a node would break with the following error:
Uncaught PHP Exception LogicException: "Settings can not be serialized. This probably means you are serializing an object that has an indirect reference to the Settings object. Adjust your code so that is not necessary." at docroot/core/lib/Drupal/Core/Site/Settings.php line 67
I don't want to change to RTBC since I can't judge whether or not the code is as it should be. But it does resolve the issue with paragraphs.
Comment #12
Crell CreditAttribution: Crell at Palantir.net for Acquia commentedI think of the available options, #10 is the approach I hate the least. :-( Damn you FAPI!
Comment #13
phenaproximaI would suggest the use of
get_class($this)
rather than hardcoding the class name. Just for future proofing :)Ideally this service should be injected.
Comment #14
Crell CreditAttribution: Crell at Palantir.net for Acquia commentedCommitted #10. Thanks, Bec.