Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Warning: array_replace_recursive(): Expected parameter 1 to be an array #24

Open
Philscode1 opened this issue Mar 31, 2023 · 10 comments

Comments

@Philscode1
Copy link

TYPO3 11.5.25
PHP 7.4

I got the error:
PHP Warning: array_replace_recursive(): Expected parameter 1 to be an array, null given in /var/www/html/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 1779

@taunusweb
Copy link

The same with TYPO3 11.5.33 and PHP 8.0, any hints for that?

@foppelfb
Copy link
Member

foppelfb commented Dec 5, 2023

The Position is related to slug generation, but the variable at that point should not be null.. I wonder how that happens at all. can you provide an xls or csv that triggers this error?

@taunusweb
Copy link

Yes, this is my file (no personal Data, so it's fine for me to provide ist ;)

Mappe1.xlsx

@foppelfb
Copy link
Member

foppelfb commented Dec 5, 2023

Ok, that is fairly simple. What type of record are you trying to import?

@taunusweb
Copy link

I try to import the xlsx file into the tx_cartbooks_domain_model_book table, but I don't know, if I understand, what you mean...

@foppelfb
Copy link
Member

foppelfb commented Dec 5, 2023

yes thats what i meant.. I'll check it out later

@foppelfb
Copy link
Member

foppelfb commented Dec 6, 2023

Ok. I need more information. I tested this with a vanilla installation of this extension with EXT:cart_books, and I did not have any problems importing your dataset.

xls-import uses the DataHandler to write the new records to the database, and of course it will run all registered hooks in that case, and apply configured actions from the TCA where applicable (like slug generation for example).

  1. Does your error message happen at the exact line as mentioned in the title?
  2. Did you change or amend anything in the TCA configuration for the table tx_cartbooks_domain_model_book?
  3. are there other extensions present in the system that add to the DataHandler (in general or in relation to EXT:cart_books)?

@taunusweb
Copy link

  1. Yes, that's exact the Messege I get (Line 1779)
  2. No
  3. I don't know exactly, I think not.

@calien666
Copy link
Member

@taunusweb @Philscode1
I had the same issue today while reworking for v12 support.
Did you try to update records and has your user access for the slug field? The error encountered at mine, when the system tried to update the slug for an existing record.

@sbuerk
Copy link

sbuerk commented Jan 14, 2024

TYPO3 11.5.25 PHP 7.4

I got the error: PHP Warning: array_replace_recursive(): Expected parameter 1 to be an array, null given in /var/www/html/public/typo3/sysext/core/Classes/DataHandling/DataHandler.php line 1779

Just as a general advice - for these kind of errors/exceptions, it is always good to enable the debug mode and than provide the complete stack trace. This allows a extension maintainer/contributer to see the call chain and have some map at hand how it may come to this error in a TYPO3 core class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants