Problem/Motivation
I upgraded to PHP 8, Drupal 9 and whatnot. Now my Excel exports bomb.
Steps to reproduce
I attached the view but the point is, if the style is configured in the default display and not the overridden data export display then the options are simply not there.
Proposed resolution
The patch attached works -- and after writing it I found line 802 and 807 uses the same code which gives me some confidence. Is it time for a helper method? ksenzee taught me to factor out things used three times :)
drush php has this to say:
>>> $view->getStyle()->options['formats'];
=> [
"xlsx" => "xlsx",
]
>>> $view->getDisplay()->options['style']
=> [
"type" => "data_export",
"options" => [],
]
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
ghost of drupal pastComment #3
ghost of drupal pastComment #6
steven jones commentedThanks @ghost of drupal past!
I've applied your patch to a MR, and we'll merge that in if all existing tests pass.
Comment #8
steven jones commented