- Issue created by @joachim
- π¬π§United Kingdom joachim
I was thinking what would be needed here would be to do an update of existing config, but I've just tried creating a new view from scratch, and the preview crashes.
- π¬π§United Kingdom joachim
Ok, re-saving the view fixes the crash, so it *is* a config update that's needed.
The views preview crash is still happening, so that must be something else.
- πΊπΈUnited States tr Cascadia
@joachim: Did the update function work properly? I can't reproduce this problem, and as I said I believe the update function should be updating any views_aggregator table views on your site.
Are you still having the issue with the preview? If so I need steps to reproduce - if you are getting a crash with the preview I need the PHP error that you are seeing from your logs. I don't see that problem on my sites.
- π¨π¦Canada poker.ca
Same/similar issue here. After updating to 2.1.0, I ran update.php and cleared the caches, but still get this error when loading any page that uses this module. Other pages (tables) are working OK...
TypeError: Drupal\views_aggregator\Plugin\views\style\Table::getCellRaw(): Return value must be of type string, false returned in Drupal\views_aggregator\Plugin\views\style\Table->getCellRaw() (line 754 of /var/www/drupal/web/modules/contrib/views_aggregator/src/Plugin/views/style/Table.php).
- π¨π¦Canada poker.ca
Same/similar issue here. After updating to 2.1.0, I ran update.php and cleared the caches, but still get this error when loading any page that uses this module. Other pages (tables) are working OK...
TypeError: Drupal\views_aggregator\Plugin\views\style\Table::getCellRaw(): Return value must be of type string, false returned in Drupal\views_aggregator\Plugin\views\style\Table->getCellRaw() (line 754 of /var/www/drupal/web/modules/contrib/views_aggregator/src/Plugin/views/style/Table.php).
- πΊπΈUnited States tr Cascadia
@poker.ca: That's a different problem.
I opened up a new issue for your bug here: π Table::getCellRaw(): Return value must be of type string, false returned Active
Please read that issue, - π¬π§United Kingdom joachim
> @joachim: Did the update function work properly? I can't reproduce this problem, and as I said I believe the update function should be updating any views_aggregator table views on your site.
I'm embarassed to report I hadn't run the update function. Running it fixes the crash -- the update function correctly changes the type of the group_aggregation_results property:
- group_aggregation_results: '0' + group_aggregation_results: 0
However, the update function also made these changes which I'm confused about:
- totals_per_page: 1 - precision: 2 + totals_per_page: 0 + precision: 0
- πΊπΈUnited States tr Cascadia
- totals_per_page: 1 - precision: 2 + totals_per_page: 0 + precision: 0
In the previous version of the module, totals_per_page was sometimes a string and sometimes boolean. The update function sets it to 1 if the old value can be evaluated to true, and sets it to 0 otherwise. I don't see what went wrong here, because your old value was 1 and that should have evaluated to true, so the update function shouldn't have changed it.
For precision, the old type was a string, and the new type is integer. The update function just does a cast to an integer. So I don't see how that would have changed it from 2 to 0.
In both cases, it looks like your old values were already integers, which is puzzling because the were not declared or used as integers in the old version of this module. That was part of the point with this update - to fix the wrongly typed configuration variables. I have no explanation for why the values were wrongly changed - I tested this by installing an older version of the module, setting my totals_per_page and precision to your values, then running the update function, and it worked properly for me.
- π³πΏNew Zealand ericgsmith
Hi @tr
I have also experience this same result after updating.
It looks like there is a missing
.
inviews_aggregator_update_10200
between the key and property for when the current values of precision and totals_per_page are fetched which is then not getting the actual values and setting them as 0.E.g. the value comes from
$key . 'column_aggregation.precision'
and is set to$key . '.column_aggregation.precision'
- Merge request !29Issue #3482129: Fix missing seperator between key and property when getting the old value in update hook β (Closed) created by ericgsmith
- π³πΏNew Zealand ericgsmith
Opened MR for that - https://git.drupalcode.org/project/views_aggregator/-/merge_requests/29/...
I see now that this is not really to do with the original summary only the last few comments in this issue - let me know if you want me to open as a new issue instead.
- πΊπΈUnited States tr Cascadia
It is my understanding that the original issue described in the issue summary was because update.php had not been run.
The additional problem with
totals_per_page
andprecision
that was raised by @joachim in #9 is a bug and was correctly diagnosed by @ericgsmith in #11. That bug is now fixed, and there is a new release 2.1.1 now so that no-one else will have that same issue. See π Totals per page and column precision always set to 0 in views_aggregator_update_10200 Active for further details.I think this issue can be closed now?
- π¨πSwitzerland clava
After an update to 2.1.1 I still get an error:
TypeError: Drupal\views_aggregator\Plugin\views\style\Table::getCellRaw(): Return value must be of type string, false returned in Drupal\views_aggregator\Plugin\views\style\Table->getCellRaw() (line 754 of modules/contrib/views_aggregator/src/Plugin/views/style/Table.php). - πΊπΈUnited States tr Cascadia
@clava: As I already said in response to #6/#7, that's a different issue. I gave a link to that issue, and that is where that problem is being worked on. It has nothing to do with this issue.
- πΊπΈUnited States tr Cascadia
As per #16. The original issue was because update.php wasn't run - it wasn't a bug in this module.
The subsequent problem raised in #9 was fixed in a different issue.
Nothing left to fix here.