- Issue created by @gaddman
- First commit to issue fork.
- 🇮🇳India viren18febs
Hi @gaddman
i have added a patch for the changes .Please review
Thanks - Status changed to Needs review
about 1 year ago 4:44am 18 December 2023 - Open on Drupal.org →Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - Status changed to Active
about 1 year ago 7:45am 18 December 2023 Yeah, that works, I just wasn't sure if that's the right solution since the Claro theme doesn't do that. As an example, editing web/themes/contrib/bootstrap/src/Plugin/Preprocess/FieldMultipleValueForm.php also avoids the problem:
if (is_array($header_row) && isset($header_row['data'])) { $header_row['data'] = is_array($header_row['data']) ? ($prefixes + $header_row['data']) : ($prefixes + ['#markup' => $header_row['data']]); + } elseif (empty($header_row)) { + $header_row = ['data' => $prefixes]; } else { $header_row = ['data' => $prefixes + ['#markup' => $header_row]]; }
- First commit to issue fork.
- Open on Drupal.org →Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - Status changed to Needs review
about 1 year ago 8:06am 18 December 2023 - 🇮🇳India sakthi_dev
Hi @viren18febs from the backend we have else condition that might not require.
- Status changed to Active
about 1 year ago 7:49pm 18 December 2023 - 🇺🇸United States easp
I applied patch #3 and it fixed my node edit error.
Now I am having problems with table form types:
$form['report_result_wrapper']['sales'] = [
'#type' => 'table',
'#header' => $header,
'#rows' => $rows,
'#empty' => t('Nothing found'),
'#attributes' => ['class' => ['report-results-table', 'sticky-header', 'table-condensed']],
'#sticky' => TRUE,
];All header and rows display as empty.
@easp what if you edit as per my comment #5 (retaining the original else condition)?
- 🇺🇸United States easp
Comment #5 appears to have corrected the node edit error and now table form types display correctly.
- last update
about 1 year ago Build Successful - Status changed to RTBC
about 1 year ago 12:56pm 22 December 2023 - 🇺🇸United States danchadwick Boston
+1 on RTBC. I have this problem not with an entity reference but with a table I'm generating which has empty column headers.
- Status changed to Needs review
about 1 year ago 8:10pm 26 December 2023 I misread @easp's comment #10 so just realising now that @sakthi_dev's MR32 in comment #7 hasn't been tested. It's a simpler fix than my proposal (@easp's patch #12) so would be good to see if there's any downside of that approach. Fixes the issue for me and hasn't broken anything obvious I can see.
- Open on Drupal.org →Core: 10.1.4 + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass - 🇸🇮Slovenia KlemenDEV
I can confirm the MR fixes the bug for our websites and does not seem to introduce any additional regressions.
- Status changed to RTBC
about 1 year ago 5:20pm 29 December 2023 - 🇸🇮Slovenia KlemenDEV
Could any maintainer merge this into a release? This issue could be preventing people from updating to 10.2.x unless they opt to use a patch
See also core issues:
- Confirmed related: 🐛 header array empty in theme.inc TypeError: strlen(): Argument must be of type string, array given in Unicode.php Needs review
- Possibly related: 🐛 Link Active
We can confirm the original bug report on Drupal 10.2.1 under PHP 8.1.27.
And more importantly, can confirm the crash is fixed after applying a patch for the changes that MR32 makes (https://git.drupalcode.org/project/bootstrap/-/merge_requests/32.patch).- 🇸🇮Slovenia KlemenDEV
I can now confirm RTBC based on 2-week running experiment on one of the sites, LGTM
- Status changed to Needs review
about 1 year ago 9:09pm 22 January 2024 - last update
about 1 year ago Build Successful - 🇨🇦Canada Liam Morland Ontario, CA 🇨🇦
The TypeError is because
#markup
is not a string. The patch in #12 does fix that problem for me, but it does not ensure that#markup
is always a string. It could break in other situations, ending up an a non-empty array without adata
key or an integer, for example. The patch in this issue ensures it is a string. - Open on Drupal.org →Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass The last submitted patch, 27: bootstrap-error_when_form_has_entity_reference-3409370-27.patch, failed testing. View results →
- Status changed to Needs review
about 1 year ago 9:20pm 22 January 2024 - 🇬🇧United Kingdom TomChiverton
https://git.drupalcode.org/project/bootstrap/-/merge_requests/32.patch fixes it for me too. Can we get it merged and deployed ?
- Status changed to RTBC
about 1 year ago 6:28pm 31 January 2024 - 🇬🇷Greece pappis Greece
Patch in #27 fixes issue for me too.
This was a scary bug.
Took me some time until google sent me to this page. - First commit to issue fork.
- Open on Drupal.org →Core: 10.2.1 + Environment: PHP 8.1 & MySQL 5.7last update
about 1 year ago Waiting for branch to pass -
shelane →
committed 41126d52 on 8.x-3.x authored by
sakthi_dev →
Issue #3409370 by Liam Morland, gaddman: PHP error when form has entity...
-
shelane →
committed 41126d52 on 8.x-3.x authored by
sakthi_dev →
- Status changed to Fixed
about 1 year ago 8:34pm 12 February 2024 - 🇺🇸United States shelane
Thanks. Sorry, I have been out sick for a while. It has taken me some time to get well and get to this.
Automatically closed - issue fixed for 2 weeks with no activity.