- Issue created by @quietone
- 🇳🇿New Zealand quietone
Uploading the patch from the other issue.
And adding credit.
- last update
over 1 year ago 29,343 pass, 20 fail - Status changed to Needs work
over 1 year ago 10:03am 10 May 2023 - 🇮🇳India ranjith_kumar_k_u Kerala
The above patch fixed the problem in the "Default value" section but introduced a problem to the content-adding section.
The "Add another item" button is not working on the first click, added screen recordings below.Note: The problem only exists in the content-adding section, not in the "Default value" section.
- First commit to issue fork.
- Open on Drupal.org →Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass - @shoroshanska opened merge request.
- Status changed to Needs review
over 1 year ago 12:46am 15 May 2023 - 🇺🇦Ukraine shoroshanska
I have fixed the issue in the MR:
https://git.drupalcode.org/project/drupal/-/merge_requests/3994
Please review. - Status changed to Needs work
over 1 year ago 5:36pm 15 May 2023 - Status changed to Needs review
over 1 year ago 12:46pm 17 May 2023 - last update
over 1 year ago 29,388 pass - 🇮🇳India ranjith_kumar_k_u Kerala
Fixed test failures and added new tests, please review
- Status changed to Needs work
over 1 year ago 3:34pm 19 May 2023 - 🇺🇸United States smustgrave
Ran the tests without the fix and they fail so removing that tag.
The proposed solution is empty though, issue summary should be updated completely please
Thanks.
- Status changed to Needs review
over 1 year ago 11:44pm 29 June 2023 - last update
over 1 year ago 29,566 pass - Status changed to RTBC
over 1 year ago 10:10pm 2 July 2023 - 🇺🇸United States smustgrave
Did a Standard install
Added a Text (Plain) filed
Set to unlimited
Verified 2 default fields
Applied patch and verified I only see oneRan tests without the fix and got
Behat\Mink\Exception\ExpectationException : 2 elements matching xpath "//table[@id='field-unlimited-values']/tbody/tr//input[contains(@class, 'form-text')]" found on the page, but should be 1.And
Behat\Mink\Exception\ExpectationException : A field "default_value_input[yes8p0w5][1][target_id]" appears on this page, but it should not.
Think this is good.
- last update
over 1 year ago 29,443 pass - last update
over 1 year ago 29,443 pass - Status changed to Needs review
over 1 year ago 6:36am 6 July 2023 - last update
over 1 year ago 29,801 pass - 🇫🇮Finland lauriii Finland
The proposed solution is pragmatic but it seems a bit strange to adjust the range for Field UI in
\Drupal\Core\Field\WidgetBase
which is quite low level code. The root cause to the problem is that\Drupal\field_ui\Form\FieldConfigEditForm::form
actually adds an item to the item list, and therefore it's rendered as if there was one value. 😅 It's hard to remove that because the current implementation is tied to an object that is used in few places. We have been working on untangling that in 📌 Save FieldStorageConfig at the same time as FieldConfig Fixed . Therefore I propose we adopt the minimum subset of that issue needed to address this issue. - Status changed to RTBC
over 1 year ago 9:31am 6 July 2023 - 🇮🇳India narendraR Jaipur, India
Changes looks good to me. Tested manually and things are working as expected.
One nit to address if that make sense.+++ b/core/modules/field_ui/src/Form/FieldConfigEditForm.php @@ -123,6 +130,7 @@ public function form(array $form, FormStateInterface $form_state) { + $items = $this->getTypedData($form['#entity']);
Can this be removed from here and added after first assignment at line 118?
Something like
`$items = $this->getTypedData($form['#entity']);
$element = $items->defaultValuesForm($form, $form_state)
`And later
`if ($element) {` - last update
over 1 year ago 29,801 pass - Status changed to Needs work
over 1 year ago 1:12pm 6 July 2023 - 🇺🇸United States tim.plunkett Philadelphia
+++ b/core/modules/field_ui/src/Form/FieldConfigEditForm.php @@ -219,9 +230,14 @@ protected function actions(array $form, FormStateInterface $form_state) { + $this->entity = parent::buildEntity($form, $form_state);
Should this be
$this->buildEntity()
?And can we have a follow-up to investigate adding a buildEntity call to EntityForm::validateForm()?
- Status changed to Needs review
over 1 year ago 2:40pm 6 July 2023 - last update
over 1 year ago 29,802 pass - 🇫🇮Finland lauriii Finland
Thanks @tim.plunkett! Totally makes sense to call for
$this
instead ofparent
. 🤦♂️ I also opened a follow-up and added a todo that points there: 🐛 Extra Default value field when adding a field with an unlimited values Fixed . - Status changed to RTBC
over 1 year ago 5:25pm 6 July 2023 - 🇺🇸United States tim.plunkett Philadelphia
(note, @lauriii mentioned this issue in his comment, but used the correct nid in the @todo.)
Thanks for the quick fix!
-
larowlan →
committed eb42a777 on 10.1.x
Issue #3345149 by lauriii, shoroshanska, ranjith_kumar_k_u, quietone,...
-
larowlan →
committed eb42a777 on 10.1.x
-
larowlan →
committed 93a509c6 on 11.x
Issue #3345149 by lauriii, shoroshanska, ranjith_kumar_k_u, quietone,...
-
larowlan →
committed 93a509c6 on 11.x
- Status changed to Fixed
over 1 year ago 6:11am 7 July 2023 Automatically closed - issue fixed for 2 weeks with no activity.