| Comment | File | Size | Author |
|---|---|---|---|
| #26 | ui_patterns_settings-3409221-26.patch | 4.59 KB | huzooka |
| #20 | ui_patterns_settings-3409221-20.patch | 2.32 KB | grimreaper |
Issue fork ui_patterns_settings-3409221
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
braintec commentedComment #5
ahmad abbad commentedThe hook_form_field_storage_config_edit_form_alter() is deprecated and should be replaced by hook_form_field_config_edit_form_alter().https://www.drupal.org/node/3386675
Comment #6
ahmad abbad commentedComment #7
braintec commentedI tried testing the fork ui_patterns_settings-3409221 and encountered this issue. After updating Drupal from 10.1.7 to 10.2 and replacing ui_patterns_settings with the proposed fork, the problem shifts to the core and returns the error: 'InvalidArgumentException: The configuration property settings.allowed_values.0.label.0 doesn't exist.' in Drupal\Core\Config\Schema\ArrayElement->get() (line 76 of core/lib/Drupal/Core/Config/Schema/ArrayElement.php). Installing Drupal 10.2 from scratch and using the fork instead of the official release doesn't change anything, or rather, the module doesn't throw an error, but the core does. It seems that someone else has reported this issue with the core.
Comment #8
kerrymick commentedI tested the fork as a patch on 10.2 and it fixed the issue for me.
Comment #9
liber_tIt's worked for me too
Comment #10
steveoriolIt's worked for me too
Add inside "patches" section on composer.json files :
Comment #11
rajab natshahComment #12
very_random_man commentedYep, worked for me too. Thanks!
Comment #13
ekes commentedWorks, but it the hook_ should be ui_patterns_settings_ rather than ui_patterns_ as that's this module's name (rather than the one it depends on).
Comment #14
carlosmonroy commentedIt's worked for me, as show by #10
Thanks!
Comment #15
thejimbirch commentedAnother +1 for RTBC
Comment #16
kekkisEdit: I misread the patch. Sorry. It's a hook_form_FORM_ID_alter now and will not cause incompatibility.
Comment #17
kekkisI have to take back my takeback. In Drupal 10.1 and below, the field configuration form and the field storage configuration form were two separate forms. In Drupal 10.2, the forms have been combined into one. Changing the hook this way would break the module when used with Drupal 10.1 (or below). If I'm reading the code correctly, changing the hook this way (from using form id
field_storage_config_edit_formto using form idfield_config_edit_form) would make the alterations move from the field storage config form to the field config form which is an entirely different thing in D10.1 and below. So then basically the submit function added in the hook,ui_patterns_settings_form_field_storage_config_edit_form_submit, will run on the field config rather than field storage config, meaning that the stored configuration would change, and most probably would not work correctly in other parts of the module anymore.Based on the above I'm setting this back to Needs work. A solution should be found that works both on Drupal 10.1 and Drupal 10.2, at the very least, based on the project page's statement of supported major versions.
Comment #18
thejimbirch commentedDrupal 10.1 EOL is slated for the Week of June 17, 2024.
Comment #19
catchIf the new hook implementation is only needed on Drupal 10.2, and the old hook implementation is only needed on Drupal 10.1, then including them both, but returning early based on comparing against Drupal::VERSION, should work.
Comment #20
grimreaperHi,
Uploading patch for Composer usage.
This error prevents adding field on content entity types with Field UI on Core 10.2.
Comment #21
grimreaperComment #24
huzookaI continued working on MR 21
_ui_patterns_field_form_alter, and aligned it a bit so it can work both on the old storage form and also on the new, combined formAdding a traditional patch too.
Comment #25
huzookaComment #26
huzookaAddressed review feedback, asking for a next review.
Adding the usual traditional patch too.
Comment #27
duaelfrI closed #3417535: Unhandled exception in function ui_patterns_settings_form_field_storage_config_edit_form_alter as a duplicate of this issue.
Please consider crediting people that worked over there.
Comment #28
grimreaperDiscussed with @Christian.wiedemann, I will try to check if both hooks can be preserved for backward compatibility instead of going to a hook_form_alter.
If not possible, we do a release then drop core 10.1 support in this issue.
Comment #29
grimreaperComment #31
grimreaperNew MR 27 ready for review.
Comment #32
grimreaper@herved, https://www.drupal.org/u/herved should also be credited. But as he only did code review in Gitlab, he is not appearing in the list.
Comment #35
christian.wiedemann commentedThanks to all!
Comment #36
christian.wiedemann commentedThe new version will only be for drupal 10.2 or above
Comment #38
thejimbirch commentedUpdating attribution
Comment #39
julien tekrane commentedThanks @DuaelFr for your mention. It was not done but not an issue for me. Most important : resolution
Comment #40
christian.wiedemann commented