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

store can not be called here, because it clears object's data_map #819

Closed
wants to merge 1 commit into from
Closed

store can not be called here, because it clears object's data_map #819

wants to merge 1 commit into from

Conversation

SerheyDolgushev
Copy link
Contributor

For example we have a content class, which consist of following attributes:

  • attribute 1 (any datatype)
    ...
  • attribute 10 (any datatype)
  • attribute 11 (objectrelation list datatype)
  • attribute 12 (any datatype)
    ...
  • attribute 20 (any datatype)

When new content object of this type is published (without any relations in attribute 11). Its datatype cache will be cleared. And it will be not possible to get valid objects datamap in attribute 12 ... attribute 20.

Current changes fixes this bug.

@bdunogier
Copy link
Member

Looks legit. Gotta say I'd really appreciate if there was a test covering this case. I'll check this out.

@SerheyDolgushev
Copy link
Contributor Author

I found this issue with custom datatype, which was using objects data map in fetchObjectAttributeHTTPInput method. Sorry, im not sure, if some build-in datatypes are using object data map in fetchObjectAttributeHTTPInput.

Copy link
Member

@glye glye left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you verify that only this datatype does this?
It does look weird that it only calls setContent() and store() when the list is empty.

Is the docblock wrong too, then?
Fetches the http post var string input and stores it in the data instance.

@SerheyDolgushev
Copy link
Contributor Author

SerheyDolgushev commented May 12, 2020

@glye

Did you verify that only this datatype does this?

To be honest, I do not remember, but most likely "yes" is the answer

Is the docblock wrong too, then?

Seems like it is

At any rate, is there a chance this PR will be merged? Or should we just wisely close it?

@glye
Copy link
Member

glye commented May 12, 2020

It seems sensible. But finding the time to verify it is the problem. We need to at least compare with other datatypes.

@glye
Copy link
Member

glye commented May 12, 2020

Now I feel bad 😃 I had a look at some other datatypes, and the PR seems correct. If you reopen it I will merge.

@SerheyDolgushev
Copy link
Contributor Author

I was unable to reopen this one, as the source branch was removed some time ago. So I made #1455.

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

Successfully merging this pull request may close these issues.

3 participants