8000 [DataObject] Link fields accept strings by blankse · Pull Request #11268 · pimcore/pimcore · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[DataObject] Link fields accept strings #11268

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

Merged
merged 4 commits into from
Feb 2, 2022
Merged

Conversation

blankse
Copy link
Contributor
@blankse blankse commented Jan 25, 2022

In Pimcore 6.9: If you set an string value to an Link field the value is saved and returned also if you reload the object.

In Pimcore X there is a typehint on the setter method. So it is not possible to set strings. But it can be still in the db.

I add a test and optimize the methods so it can only be Link object or null (from db/user)

@blankse blankse marked this pull request as draft January 25, 2022 10:13
@blankse blankse changed the base branch from 10.2 to 10.x January 25, 2022 10:43
@blankse blankse changed the title [DataObject] Link fields accept strings [Tests] Add test for Link fields Jan 25, 2022
@blankse blankse marked this pull request as ready for review January 25, 2022 10:48
@blankse
Copy link
Contributor Author
blankse commented Jan 25, 2022

Ok the typehint is only if generateTypeDeclarations is true. So this problem appears also in Pimcore X. I rebase to 10.2 and add a validation test

@blankse blankse changed the base branch from 10.x to 10.2 January 25, 2022 12:20
@blankse blankse changed the title [Tests] Add test for Link fields [DataObject] Link fields accept strings Jan 25, 2022
@brusch brusch added this to the 10.2.10 milestone Feb 2, 2022
@brusch brusch added the Bug label Feb 2, 2022
@kingjia90 kingjia90 merged commit 100986b into pimcore:10.2 Feb 2, 2022
@blankse blankse deleted the link_strings branch February 2, 2022 15:02
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 this pull request may close these issues.

3 participants
0