Problem/Motivation
I've tried the following. I've created a boolean parameter in eca_parameters (admin/config/workflow/eca/parameters). After that i've locked the collection from within eca_parameters. after that i've added a different parameter type which was successfully created (unfortunately i am not sure anymore which). After that i wanted to unlock the collection again. the page load took unusually long and ended in:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 16384 bytes) in /var/www/html/web/core/lib/Drupal/Core/Database/StatementWrapper.php on line 95
i then went to admin/config/parameters and clicked the edit ECA collection button. i ran into a slightly different error:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 1003520 bytes) in /var/www/html/web/core/lib/Drupal/Core/Plugin/DefaultLazyPluginCollection.php on line 114
i am still able to edit the global collection and apply the same steps. create a parameter, lock the global collection, add another parameter, and finally successfully unlock the collection again. same for an entirely new collection i was able to create and apply those steps. everything behaves as expected. the only collection having a problem is the eca one.
if i take a look into the logs i get the following warning pretty frequently
Location https://ecatest.ddev.site/admin/config/parameters
Referrer https://ecatest.ddev.site/admin/config/parameters/global/lock
Message Theme hook big_pipe_interface_preview not found.
but it always refers to the global/lock not anything with eca in the route what i would have expected. its a bit odd. no idea how i could debug that further :(
i am running an install of drupal 10.1.x-dev in ddev locally with php8.2 & mariadb 10.5. aside that i am running eca 1.1.x-dev, bpmn 1.1.x-dev, eca parameters 1.0.0, eca parameters ui 1.0.0, parameters 1.0.0 and parameters ui 1.0.0 and danse 2.2.x-dev@dev
Comments
Comment #2
rkollerafter some sleep i've retried to access the eca collection via the parameters tab in eca. the computer was shut down over night. so after starting up colima and the ddev project i got the following on the first try:
when accessing the eca collection via the parameters collection list edit button afterwards i got again the following:
also the same short fatal error when i tried to access the collection via the parameters tab in eca a second time.
Comment #3
mxh commentedI can't reproduce this, also not with the ECA collection.
What I need is in which order which types of parameters were added.
Alternatively, you could upload the file "parameters.collection.eca.yml" of your exported configuration, for example with
drush cex. Or via UI at/admin/config/development/configuration/single/export, where you can choose "Parameters collection" -> "ECA (eca)" and upload its contents as a text file here (please don't copy-paste into the comment, because its formatting is not helpful for reading).Comment #4
rkollerokaaaay i havent thought about exporting the config. but that was still working. excellent idea!
it was the
referenced parameterparameter type. back then the steps were as described in the issue summary. i've created the boolean value. then locked the eca collection. then added the referenced parameter one. saved and then tried to unlock the collection. and from that point on i ran into the issues.i've tried now on another page to simply add the referenced parameter, used
ecaas the target collection, and usedallas the target parameter. after that i tried to lock the collection and directly ran into the error (so it doesnt matter in which way it is to lock or to unlock the collection).Comment #5
mxh commentedAh, the reference one :) Now I can reproduce and will have a look.
Comment #7
mxh commentedI've pushed a possible fix into 1.0.x. If you could try it out for the specific collection posted in #4 (and maybe others) that would be helpful.
I've changed the form to add referenced parameters in the way, that someone cannot reference to all parameters of the same collection again. But that's part of the form validation. So if you already did this on another site, this fix doesn't cover that (the configuration needs to be manually deleted then).
Comment #8
mxh commentedComment #9
rkolleri've tried to lock and unlock the collection in the project i first ran into the issue. it works now without exceeding the memory limit. and the
- all -got removed if you trying to add a parameter within the target collection you are in. i would suggest two extra steps.first would it be possible to have conditional description for the target parameter select field? because in case the parameter is added to the same collection the
-all-option got removed with your fix. In that case the current descriptionWhen choosing - All - then all parameters of the whole target collection are being referenced.is misleading and potentially confusing.and i would also update the error message by providing a suggestion how to fix the error when save is clicked while the
-select-option is selected. if a user hasn't created a parameter yet and creates a referenced parameter as the first parameter then the target parameter select list has-select-as the only option. if you click save there with for example eca as the target collection you get1 error has been found: Target collectionas the error message. maybe change the error to something like the following in case no parameters are available for the selected target collection yet:The target collection doesn't contain any parameter to select from yet. Create a parameter first.. If there are one or more parameters available and the users selected-select-anyway by accident use something like that:No parameter selected in the target collection.Comment #11
mxh commentedThanks for providing the valuable feedback. I've totally overlooked the description with the -All- selection. I've pushed another commit that addresses #9. Hope this is what you had in mind.
Comment #12
mxh commentedAssuming to be fixed, feel free to re-open if not.
Comment #14
rkollerwoops sorry for the late reply. too many things in parallel the last few weeks. i thiiink i've tested it back then and simply forgot to reply in the issue in the end. but wanted to make sure and quickly retest tonight. but ran into another error in another module when i've updated the outdated composer dependencies of my test install. :/ will provide a feedback as soon as i am able to access my site and am able to retest.
Comment #15
mxh commentedNo worries, report back anytime you want.