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

Documentation: Remove "source" key when using meta attributes #3652

Closed
wants to merge 1 commit into from

Conversation

prtksxna
Copy link
Contributor

When the source key is added, the elements don't get updated in
their lifecycle but the data gets saved correctly. Based on @pento's
Gist, removing this key fixes the problem.

https://gist.github.com/pento/19b35d621709042fc899e394a9387a54

When the source key is added, the elements don't get updated in 
their lifecycle but the data gets saved correctly. Based on @pento's
Gist, removing this key fixes the problem.

https://gist.github.com/pento/19b35d621709042fc899e394a9387a54
@aduth
Copy link
Member

aduth commented Nov 27, 2017

Since #2854, we should assume any attribute included in attributes should define its source, except for comment attributes. Could you share an example of a problematic meta-based block, in case there's an underlying issue that needs to be resolved?

cc @youknowriad

@aduth aduth added [Feature] Block API API that allows to express the block paradigm. [Status] Needs More Info Follow-up required in order to be actionable. labels Nov 27, 2017
@prtksxna
Copy link
Contributor Author

prtksxna commented Dec 2, 2017

Hey @aduth o/ Thank you for your response, and sorry for replying so late.

If you see the gist that I linked to you'll notice that it currently does not have source: "meta". If you do add it then the meta data doesn't get saved. Hitting update doesn't actually save the value, and when you refresh the editor the value is back to zero.

I am testing on Firefox 59, on Mac OS, on version 245035b.

@youknowriad
Copy link
Contributor

@prtksxna You're right and that's a bug, it's probably related to the fix I pushed yesterday #3754 It should behave better in the next release. Dropping the "source" makes it work because it's not saved in post_meta anymore but it's saved as a "comment" attribute.

@aduth
Copy link
Member

aduth commented Dec 3, 2017

Based on #3652 (comment), considering this superseded by #3754. Thanks for the pull request and issue report.

@aduth aduth closed this Dec 3, 2017
@prtksxna
Copy link
Contributor Author

prtksxna commented Dec 3, 2017

In that case I'll close this PR. In your PR #3754 I could not find a reference to the issue though. Could you please point me to it so that I can subscribe?

Thanks @aduth and @youknowriad!

@prtksxna
Copy link
Contributor Author

prtksxna commented Dec 3, 2017

Oops! Sorry for the misleading comment @aduth, I had kept this tap open for too long and did not see your reply before drafting that comment. Thanks again.

@prtksxna prtksxna deleted the patch-1 branch December 3, 2017 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Block API API that allows to express the block paradigm. [Status] Needs More Info Follow-up required in order to be actionable.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants