- Issue created by @gge
- 🇩🇪Germany jurgenhaas Gottmadingen
This sounds like being related to 🐛 ECA Form breaks complex IEF widget Active . Can you provide any more details from the logs please?
- 🇷🇴Romania gge
Logs are not present, the console is clean. I'm using the simple ief widget and the same behaviour is present if using the complex widget.
- 🇩🇪Germany jurgenhaas Gottmadingen
Logs are not present
There must be something somewhere. Either in Drupal's watchdog or in the PHP logs. It's hard to watch the video and getting an idea what's going on. If you really can't find any logs anywhere, we then need step by step instructions on how to reproduce this behaviour on a fresh Drupal installation.
- 🇷🇴Romania gge
@jurgenhaas I will come back with more information in the next couple of days, thanks.
I'm experiencing similar issue with Entity Browser display.
In my case, I have some custom ECA workflow created for one content type. Custom ECA workflow is utilizing multiple FORM: ADD AJAX HANDLER activities.
These AJAX handlers were working fine until I upgraded ECA module to version 2.0.9 after which Entity Browsers within the entry/edit page of given content type stopped working - they don't get displayed any more as pop-up window.
Browser console is giving Ajax (http 500) related error while in Drupal log I'm getting this message :
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 1920 of C:\xampp\htdocs\project\core\lib\Drupal\Core\Database\Connection.php).
By downgrading ECA module to version 2.0.8 OR by deleting/removing mentioned FORM: ADD AJAX HANDLER activities from the ECA workflow Entity Browsers appear to work again as expected.
Hope this info helps for patching the ECA module.
- 🇩🇪Germany jurgenhaas Gottmadingen
Thanks @gripphon for the extra details. We don't know for sure if it's caused by the same thing, but it could be.
I looked through the code changes between 2.0.8 and 2.0.9 and nothing comes to mind what could be causing this.
So, something that helps us to reproduce the problem on a fresh Drupal installation would be required.
- 🇩🇪Germany jurgenhaas Gottmadingen
We still don't have enough details to reproduce this bug. But another issue at 🐛 Add Ajax Handler Cause error in paragraph module Active seems to report something similar. So I had another look into the differences between 2.0.8 and 2.0.9, and I wonder if 📌 Provide more context to ECA action plugins Active could have introduced an issue with serializing plugins.
To find out, could you try and remove
$this->plugin->setEcaAction($this);
at line 70 ofsrc/Entity/Objects/EcaAction.php
and then check if the error is gone?However, please still help us to get a reproducable environment so that we can dig deeper into this.
jurgenhaas,
I just tried to remove
$this->plugin->setEcaAction($this);
that you suggested and yes, that appear to solve my problem here - Add Ajax Handler Cause error in paragraph module 🐛 Add Ajax Handler Cause error in paragraph module Active- Merge request !462Issue #3492911 by gge, jurgenhaas, gripphon, abx: ECA context information... → (Merged) created by jurgenhaas
- 🇩🇪Germany jurgenhaas Gottmadingen
I've created an MR, please give that a try and let us know if that fixes your issues.
Tried MR and got another error below :
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 1920 of /public_html/core/lib/Drupal/Core/Database/Connection.php).
- 🇩🇪Germany jurgenhaas Gottmadingen
So, back to square 1: who can provide us with a step by step guide on how to reproduce this issue on a fresh Drupal 11 site?
- 🇷🇴Romania gge
Hello!
Here are the steps to reproduce this:
1. Install ECA submodules (I don't have ECA Migrate and ECA Workflow activated)
2. Install Entity Browser and IEF.
3. Create taxonomy with couple of terms.
4. Create the view for entity browser
5. Create the entity browser.
6. Create content type Child
7. Create content type Parent
8. Try to create Parent content.
9. Select a term and click the button. After this action you'll notice that the IEF area remains empty.
Please note there are no ECA models. If the module ECA Form is deactivated, IEF is populated after taxonomy selection.
Thank you and sorry for the late reply.
- 🇷🇴Romania gge
@gripphon: Try NOT to use Build Form event to add the ajax handler. I don't get that error when using Process Form or After build events.
- 🇩🇪Germany jurgenhaas Gottmadingen
@gge thanks for the instructions in #14. I wonder if there isn't a way to demonstrate the problem with just core and ECA? Modules like entity browser and IEF are so complex in themselves, that we should first try and reproduce this with plain Drupal.
- 🇷🇴Romania gge
My initial issue was the combination of entity browser, ief and eca but in order to get a serialisation error all you have to do is to add an ajax handler to a field after the build form event.
Attached is a model that adds ajax handler to a reference field. Try to select something from the ajaxified field and the error is logged. This can be reproduced on simplytest.me with nothing else but core and eca.
If the event is After build form or Process form there's no error.
Thanks.
- 🇩🇪Germany jurgenhaas Gottmadingen
Oh great, now I can reproduce the problem. Thank you so much @gge
I've now taken a different approach in the MR and it seems to be fixed here. Please give it another try and set to RTBC if successful.
- 🇩🇪Germany jurgenhaas Gottmadingen
Thank you all for testing and feedback, will publish new releases soon.
-
jurgenhaas →
committed ba076ede on 2.1.x
Issue #3492911 by jurgenhaas, gge, abx, gripphon: ECA context...
-
jurgenhaas →
committed ba076ede on 2.1.x
-
jurgenhaas →
committed 0af1f895 on 2.0.x
Issue #3492911 by jurgenhaas, gge, abx, gripphon: ECA context...
-
jurgenhaas →
committed 0af1f895 on 2.0.x