Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
If a deliverer already exists and a new one is about to get the same name, a fatal error is thrown.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#19 | validate-function-removal-2824981.patch | 1.81 KB | Ginovski |
| |||
#13 | fatal_error_when-2824981-12.patch | 1.81 KB | Ginovski |
| |||
#13 | fatal_error_when-2824981-12-test-only.patch | 1.02 KB | Ginovski |
#12 | fatal_error_when-2824981-12.patch | 1.81 KB | Ginovski |
| |||
#12 | interdiff-2824981-11-12.txt | 371 bytes | Ginovski |
Comments
Comment #2
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedAdded method and exists check
Comment #4
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedAdded test method and moved checks and function in DelivererConfigurationForm.
Comment #5
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedNot sure if we should disable creating deliverers with the same name. It should not cause any problems since it's not a primary key.
Also, test-only patch helps to reveal a bug/fatal error in such cases.
Comment #6
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commented1.Removed delivererExists function, only checking the id.
Comment #8
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedI'm wondering when this stopped working... There is a validation added on
#machine_name
element inPluginConfigurationForm
that should prevent those cases. Could be a core bug or so.Maybe we can remove "Machine-readable name" from the sentence.
Comment #9
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commented1.Removed 'machine-readable name' from message.
Comment #11
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commented1. Forgot to update the test. (correct patch here)
Comment #12
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedRemoved unrelated change.
Comment #13
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedAdding test-only patch and the patch with the validation method.
Comment #15
toncic CreditAttribution: toncic at MD Systems GmbH commentedIs it much better now ;) only, be careful with uploading patch. Check patch before uploading.
Comment #17
miro_dietikerCommitting, but we should make sure we report the core bug if it is one.
Comment #18
mbovan CreditAttribution: mbovan at MD Systems GmbH commentedWe need some more investigation (examples) to confirm it's a core bug, but we're getting that way, since this issue occurs in Collect as well #2826323: Fatal error when creating collect model with existing name.
Comment #19
Ginovski CreditAttribution: Ginovski at MD Systems GmbH commentedThere is a bug with this patch in the validate function. When editing a deliverer and trying to save it, there is a message that reports there is a deliverer with the same machine name.
#2557299: Any AJAX call disregards machine name verification when AJAX is used and leads to a fatal error This issue covers the fatal error, and I guess when it is fixed, there will be no fatal error reported anymore.
I suggest that we revert the patch and wait for the core issue to be fixed instead.
Here is a patch removing the code from this issue.
Comment #21
miro_dietikerCommitted this. Still open is the confirmation that the other issue really solves the problem.
And we should make the other issue happen. Please help doing so.