- π¨π¦Canada m4olivei Grimsby, ON
I'm coming here having hit the following PHP fatal error with the patch in #4:
Fatal error: Unparenthesized `a ? b : c ?: d` is not supported. Use either `(a ? b : c) ?: d` or `a ? b : (c ?: d)` in /var/www/html/docroot/modules/contrib/block_field/src/Plugin/Field/FieldWidget/BlockFieldWidget.php on line 139
As @BetoAveiga noted in #9. There is a deprecation issue here for sites running on PHP 8. More information here:
https://wiki.php.net/rfc/ternary_associativity
https://www.php.net/manual/en/migration74.deprecated.php#migration74.dep...Here is an updated patch of #4 with the deprecation fix. @BetoAveiga patch from #10 was missing the changes to tests. I've also included an interdiff from #4 to this one. This applies to 8.x-1.0-rc2.
I'll be back with a patch against the latest D10 compatible release.
- Status changed to Needs review
over 1 year ago 2:30am 20 April 2023 - last update
over 1 year ago 7 pass - π¨π¦Canada m4olivei Grimsby, ON
Here is patch from #4 re-rolled for the 8.x-1.0-rc4 version.
- First commit to issue fork.
- π¦πΊAustralia rakugaki Sydney
we have a slight issue with #15 patch clearing default field values.
this little workaround is resolving the issue for us, however i'm uncertain of its robustness/appropriateness as a solution.
https://git.drupalcode.org/project/block_field/-/merge_requests/18/diffs...
- achap π¦πΊ
Same as #13 when using the patch at #15 which is using
getUserInput
theblockForm
method is called twice on load. The first time the defaultConfiguration is correct. The second time all the defaultConfiguration values are null. When I switchgetUserInput
togetValues
like #6 it is only called once and the defaultConfiguration is correct. - π¦πΊAustralia rakugaki Sydney
Updated to use getValues
Note this results in the "Display title" checkbox being checked by default, which i think is normal behavior.
https://git.drupalcode.org/project/block_field/-/merge_requests/18/diffs...
- Status changed to Needs work
3 months ago 11:59am 13 August 2024 - π¨πSwitzerland berdir Switzerland
FWIW, the test-only run passed, so the extra assertions are not exposing a bug here.