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

[Bug]: Field definition for field not found if field name starts with upper case for "If source is empty" unchecked option #369

Closed
judip opened this issue Oct 13, 2023 · 2 comments · Fixed by #377
Assignees
Labels
Milestone

Comments

@judip
Copy link

judip commented Oct 13, 2023

Expected behavior

Data target type "Direct" should handle correctly field name starts with lower and upper case in object definition.

Actual behavior

Now only fields name with lower case are handle correctly becasue line 141 (file data-importer/src/Mapping/DataTarget/Direct.php)
$fieldName = lcfirst(str_replace('get', '', $getter));
This code converts always field name to lower case and then reports error: Field definition for field "x" not found.

Steps to reproduce

Import any data for direct type and unchecked checkbox "If target is not empty" or "If source is empty".

@judip judip added the Bug label Oct 13, 2023
@eciosk
Copy link

eciosk commented Oct 25, 2023

Same here.
Pimcore 11.0.12
Data-importer 1.8.4

@dvesh3
Copy link
Contributor

dvesh3 commented Nov 9, 2023

Regression of #361

@dvesh3 dvesh3 added this to the 1.8.5 milestone Nov 9, 2023
dvesh3 added a commit that referenced this issue Nov 9, 2023
robertSt7 pushed a commit that referenced this issue Nov 9, 2023
…per case (#377)

* Fix Field definition for field not found if field name starts with upper case - resolves #369

* Apply php-cs-fixer changes

---------

Co-authored-by: dvesh3 <[email protected]>
SamyMP added a commit to SamyMP/data-importer that referenced this issue Nov 14, 2023
…h upper case

Resolves pimcore#369

Directly assign the key in the case where the "Direct" target strategy is used alongside with "SYSTEM Key".

Currently, an error is thrown because `key` is not in `$this->fieldName` since it is a system field
dvesh3 pushed a commit that referenced this issue Nov 23, 2023
…h upper case

Resolves #369

Directly assign the key in the case where the "Direct" target strategy is used alongside with "SYSTEM Key".

Currently, an error is thrown because `key` is not in `$this->fieldName` since it is a system field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants