Fatal error with views_data_export 8.x-1.6

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mkalkbrenner created an issue. See original summary.

mkalkbrenner’s picture

Status: Active » Needs review
lazzyvn’s picture

Status: Needs review » Active

check on drupal 10 and 11 class Serializer the construction doesn't need $module_handler

n.dhuygelaere’s picture

I have also the same issue. The bug occurs after an update of the drupal/views_data_export:1.5.0 to drupal/views_data_export:1.6.0. The views_data_export:1.6.0 was released on 13 June 2025. I revert the update with composer and the bug go away. If the D10 & D11 don't need $module_handler, maybe it will be better to fix the issue in views_data_export and not in views_data_export_phpspreadsheet, no ?

liuyuanchao made their first commit to this issue’s fork.

liuyuanchao’s picture

Status: Active » Needs review

Maybe it's better to change like branch 3530298-too-few-arguments-2.
Please review.

mkalkbrenner’s picture

I don't understand what are you discussing here. The base class you derived your plugin from changed its constructor with the latest release. You MUST adjust the constructor accordingly!

mkalkbrenner’s picture

OK, the parent didn't change the constructor, it added a constructor:
https://git.drupalcode.org/project/views_data_export/-/commit/dabf06138c...

mkalkbrenner’s picture

Maybe it's better to change like branch 3530298-too-few-arguments-2.
Please review.

I think that right pattern in drupal is to set values of member variables in the constructor, not in the create method.

liuyuanchao’s picture

Error occurs when someone use the old version of views_data_export.
Should we add a restriction in composer.json?

mkalkbrenner’s picture

yes, a version constraint should be added to composer.json and info.yml

lazzyvn’s picture

patch please i will release new version

liuyuanchao changed the visibility of the branch 3530298-too-few-arguments-2 to hidden.

liuyuanchao’s picture

Hi @lazzyvn

I add the version constraint in 3530298-too-few-arguments branch.
Please review.

https://git.drupalcode.org/issue/views_data_export_phpspreadsheet-353029...

lazzyvn’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.