Excel batch completely fails if style is given in default display

Created on 22 May 2022, over 2 years ago
Updated 28 December 2024, about 1 month ago

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

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada Charlie ChX Negyesi 🍁Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024