- First commit to issue fork.
- last update
about 1 year ago Patch Failed to Apply - Merge request !5865Resolve #3221958 "Multiple value does", still need Test โ (Open) created by abx
- ๐ฎ๐ณIndia Akhil Babu Chengannur
Akhil Babu โ made their first commit to this issueโs fork.
- Merge request !5996Issues/3221958: Update $delta_limit and $offset. โ (Closed) created by Akhil Babu
- ๐ฎ๐ณIndia Akhil Babu Chengannur
The EntityField.php code given in #13 was modified in ๐ Entering a non-numeric value for a start row value in 'Multiple field settings' for a views field leads to a fatal error Fixed and Integer casting operater was added to
$this->options['delta_limit']
. But the issue with table display still exists and patch #14 did not fix it.If "Display all values in the same row" is not checked, then the form to set delta limit and offset won't be displayed. So I don't think relying on
submitOptionsForm() to set delta limt and offset is the correct way.If user is not selecting "Display all values in the same row", then one value should be displayed per row. So we can give $delta_limit as 1. Else we should change the current UI behaviour and display the form to set limit and offset even if "Display all values in the same row" is not cheched.
I have configured $delta_limit as 1 and raised a new MR. It fixes the issue. But not sure if this is the correct way. So moving to needs review for maintainer review.
- Status changed to Needs review
12 months ago 6:24am 3 January 2024 - Status changed to Needs work
12 months ago 2:40pm 3 January 2024 - ๐บ๐ธUnited States smustgrave
What might help is adding the tests. Then it will be more visible if this solution works or not.
- ๐ฎ๐ณIndia Akhil Babu Chengannur
MR 5996 won't work in all the cases. So closing it.
The problem is with calculating the offest.
// Offset is calculated differently when row grouping for a field is not // enabled. Since there are multiple rows, delta needs to be taken into // account, so that different values are shown per row. if (!$this->options['group_rows'] && isset($this->aliases['delta']) && isset($row->{$this->aliases['delta']})) { $delta_limit = 1; $offset = $row->{$this->aliases['delta']}; }
$this->aliases['delta']
won't be persent in multi valued base fields so offset can't be calculated correctly. There is an ongoling issue for the same. #3097568: EntityViewsData does not generate a "additional fields" nor "delta" field for multivalue base fields โ - Merge request !6039Issues/3221958: Create a test to demonstarte the issue. โ (Open) created by Akhil Babu
- ๐ฎ๐ณIndia Akhil Babu Chengannur
I have created a failing test to show this bug. The patch in https://www.drupal.org/project/drupal/issues/3097568#comment-14224874 โ fixes this bug as it adds alias data to base fields. But it still needs some work.