- š³šæNew Zealand danielveza Brisbane, AU
I was able to replicate this, attached a patch that removes the
else
from the original patch and adds a test. - Status changed to RTBC
about 2 years ago 5:55am 10 March 2023 - š®š³India arisen Goa
Reviewed the patch in #4 on drupal 9.5.4 with php 8.1.
The patch applies cleanly:
Checking patch core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php... Checking patch core/modules/options/tests/src/Kernel/OptionsFieldTest.php... Applied patch core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php cleanly. Applied patch core/modules/options/tests/src/Kernel/OptionsFieldTest.php cleanly.
Testing steps:
- Setup drupal 9.5.4 site
- Enabled Layout builder for default display of basic page.
- Added text list field with no options.
- Tried to edit the layout. It throws the error as mentioned
- Applied the patch and verified the layout edit functionality. It works fine
- š§š·Brazil kleiton_rodrigues Americana/SP
The #4 patch applies cleanly and works as expected.
LGTM. The last submitted patch, 4: 3331397-4.patch, failed testing. View results ā
- š³šæNew Zealand danielveza Brisbane, AU
Random fail. Requeing and restoring status
- š¦šŗAustralia larowlan š¦šŗš.au GMT+10
Confirming the test failed as expected
phpunit -c app/core app/core/modules/options/tests/src/Kernel/OptionsFieldTest.php ā³ļø Bootstrapped tests in 0 seconds. š PHP Version 8.1.16. š§ Drupal Version 10.1.0-dev. šļø Database engine mysql. PHPUnit 9.6.6 by Sebastian Bergmann and contributors. Testing Drupal\Tests\options\Kernel\OptionsFieldTest .E 2 / 2 (100%) Time: 00:02.241, Memory: 10.00 MB There was 1 error: 1) Drupal\Tests\options\Kernel\OptionsFieldTest::testGenerateSampleItemsWithNoAllowedValues ValueError: array_rand(): Argument #1 ($array) cannot be empty /data/app/core/modules/options/src/Plugin/Field/FieldType/ListItemBase.php:68 /data/app/core/lib/Drupal/Core/Field/FieldItemList.php:253 /data/app/core/modules/options/tests/src/Kernel/OptionsFieldTest.php:107
-
larowlan ā
committed 3e82115d on 10.0.x
Issue #3331397 by gcb, DanielVeza, Tatsiana, arisen: ListItemBase::...
-
larowlan ā
committed 3e82115d on 10.0.x
-
larowlan ā
committed 52fbc9ad on 10.1.x
Issue #3331397 by gcb, DanielVeza, Tatsiana, arisen: ListItemBase::...
-
larowlan ā
committed 52fbc9ad on 10.1.x
-
larowlan ā
committed f8a0d181 on 9.5.x
Issue #3331397 by gcb, DanielVeza, Tatsiana, arisen: ListItemBase::...
-
larowlan ā
committed f8a0d181 on 9.5.x
- Status changed to Fixed
about 2 years ago 8:38am 31 March 2023 - š¦šŗAustralia larowlan š¦šŗš.au GMT+10
Committed to 10.1.x and backported to 10.0.x and 9.5.x
Automatically closed - issue fixed for 2 weeks with no activity.