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

[Bugfix] Extend empty check to "0" for LoadingDataObject mapping #341

Merged
merged 1 commit into from
Aug 3, 2023

Conversation

woellundwoell
Copy link
Contributor

The current check for empty in

if (empty($data) === false) {
also ignores the string "0". Thus it is not possible to use this for the import on attributes. Even if it does not make much sense this also applies to a path specification.
In our current project we have an identifier attribute that can have the value (the string) "0" among others. Without the fix an import is not possible here.

@woellundwoell woellundwoell changed the title Extend empty check to "0" for LoadingDataObject mapping [Bugfix] Extend empty check to "0" for LoadingDataObject mapping Jun 29, 2023
@dvesh3 dvesh3 added the Bug label Jul 6, 2023
@dvesh3 dvesh3 added this to the 1.8.2 milestone Jul 6, 2023
@dvesh3 dvesh3 linked an issue Jul 18, 2023 that may be closed by this pull request
@robertSt7 robertSt7 self-assigned this Jul 21, 2023
@robertSt7
Copy link
Contributor

Hi @woellundwoell could you please rebase this to 1.8? Thanks

@woellundwoell
Copy link
Contributor Author

@robertSt7 im not sure how to do this. Can you please point me in the right direction how to do this?

@robertSt7
Copy link
Contributor

@robertSt7 im not sure how to do this. Can you please point me in the right direction how to do this?

@woellundwoell It depends on what Idea you use

For Jetbrains Idea: https://www.youtube.com/watch?v=wiU3TL3jM8I

You can also just do it on the command line with: git rebase 1.8 Make sure that you have your branch checked out and have branch 1.8 in your local environment.

If you are facing any problems, please feel free to ask. Thanks

@blankse
Copy link
Contributor

blankse commented Jul 27, 2023

@robertSt7 @woellundwoell A simple rebase doesn't work here. You need to set the --onto option, otherwise you have many commits from branch 1.x. You also need a force push than, because you have changed the history of the branch.

This should work:

git clone https://github.com/woellundwoell/data-importer.git
cd data-importer
git remote add upstream https://github.com/pimcore/data-importer.git
git fetch --all
git rebase --onto upstream/1.8 upstream/1.x
git push --force

After that you need to change the target branch of the PR to 1.8.

For the next PR I would recommend to create a new branch for it.
You shouldn't use 1.x for the PR branch.

@robertSt7 robertSt7 merged commit 1b32dfc into pimcore:1.x Aug 3, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Aug 3, 2023
@robertSt7
Copy link
Contributor

@woellundwoell Thanks for the PR you don't need to care about the rebasing we will cherry pick it

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

Successfully merging this pull request may close these issues.

[Bug]: No object loading by attribut with value "0" possible
4 participants