- Issue created by @rkoller
- π©πͺGermany rkoller NΓΌrnberg, Germany
after 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:
Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php on line 524 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 Warning: Undefined array key 0 in /var/www/html/web/core/lib/Drupal/Core/Utility/Error.php on line 122 Warning: Undefined array key "file" in /var/www/html/web/core/includes/errors.inc on line 77 Warning: Undefined array key "line" in /var/www/html/web/core/includes/errors.inc on line 78 Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 20480 bytes) in /var/www/html/web/core/lib/Drupal/Core/Database/StatementWrapper.php on line 95
when accessing the eca collection via the parameters collection list edit button afterwards i got again the following:
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
also the same short fatal error when i tried to access the collection via the parameters tab in eca a second time.
- Status changed to Postponed: needs info
about 2 years ago 6:17pm 5 February 2023 - π©πͺGermany mxh Offenburg
I 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 withdrush 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). - π©πͺGermany rkoller NΓΌrnberg, Germany
okaaaay i havent thought about exporting the config. but that was still working. excellent idea!
<code>uuid: 79a946db-8298-42ec-9b19-e51c72bb224b langcode: en status: true dependencies: config: - parameters.collection.eca _core: default_config_hash: rtC3O6Xz0u5W0G0kCAyDFbZwO2xFwT5mbwE6KqAt4ls id: eca label: ECA locked: false deletable: false parameters: boolvalue: name: boolvalue label: boolvalue description: 'bool value' type: boolean weight: 1 value: true try: name: try label: try description: eserf type: reference weight: 2 target_id: eca target_name: boolvalue
it was the
referenced parameter
parameter 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
eca
as the target collection, and usedall
as 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). - Assigned to mxh
- Status changed to Active
about 2 years ago 8:15am 6 February 2023 - π©πͺGermany mxh Offenburg
Ah, the reference one :) Now I can reproduce and will have a look.
- π©πͺGermany mxh Offenburg
I'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).
- Issue was unassigned.
- Status changed to Needs review
about 2 years ago 9:25am 6 February 2023 - π©πͺGermany rkoller NΓΌrnberg, Germany
i'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 collection
as 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.
- π©πͺGermany mxh Offenburg
Thanks 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.
- Status changed to Fixed
about 2 years ago 3:35pm 6 February 2023 - π©πͺGermany mxh Offenburg
Assuming to be fixed, feel free to re-open if not.
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
about 2 years ago 11:11pm 25 February 2023 - π©πͺGermany rkoller NΓΌrnberg, Germany
woops 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.
- π©πͺGermany mxh Offenburg
No worries, report back anytime you want.