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

An exception occurred while saving the data: PHP Warning: Undefined array key "region" #347

Open
Pekkonen opened this issue Oct 10, 2024 · 2 comments

Comments

@Pekkonen
Copy link

Hi!
I have a bug with external_import, but I'm not sure in 100% in that.
I have TYPO3 12.4.21, bobosch/ods-osm - 4.2.2 and cobweb/external_importb - 7.2.5.
Then I trying to import CSV file to tt_address table I have an exception about ods_osm:

An exception occurred while saving the data: PHP Warning: Undefined array key "region" in /var/www/html/site/vendor/bobosch/ods-osm/Classes/TceMain.php line 318 (code: 1476107295, location: /var/www/html/site/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php at line 141)

In MySQL tt_address I have a correct structure with region table.
TYPO3 database analyse I have - "Database schema is up to date. Good job!"

When I uninstall ods_osm everything is going right without any errors.
In import process I have just mapping data from CSV columns to the tt_address columns, but no handling "region" column

@Pekkonen
Copy link
Author

Pekkonen commented Oct 10, 2024

When I'm trying to use custom transformation for latitude and longitude (not simple get/put values from CSV, but transform it in my viewhelper) I have a same error but about longitude:
An exception occurred while saving the data: PHP Warning: Undefined array key "longitude" in /var/www/html/site/vendor/bobosch/ods-osm/Classes/TceMain.php line 318 (code: 1476107295, location: /var/www/html/site/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php at line 141)

@fsuter
Copy link
Contributor

fsuter commented Oct 10, 2024

Hi. The error clearly points to class TceMain in extension "ods-osm", and I can't see how External Import could be involved. What I understand from what you write is that you don't import any region and thus the region field is null. However "ods-osm" apparently expects the region to be always not null. So I would say the proper way to solve this is to fix "ods-osm". If that is not possible, you can use External Import to import a dummy value in the region field, using a simple value-setting property: https://docs.typo3.org/p/cobweb/external_import/7.2/en-us/Administration/Columns/Index.html#administration-columns-properties-value

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

2 participants