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

REST API: Switch away from using `parent` as the path argument name #11914

Merged
merged 1 commit into from Nov 15, 2018

Conversation

Projects
None yet
2 participants
@danielbachhuber
Member

danielbachhuber commented Nov 15, 2018

When parent is set as the path argument name, it gets passed down
through to the create_item() method and can erroneously reset the
parent value on the post itself.

Also ensures revision query params aren't exposed as the query params
for autosaves.

Originally https://core.trac.wordpress.org/attachment/ticket/43316/43316.24.diff

Fixes #10753
Follow up from #11513

REST API: Switch away from using `parent` as the path argument name
When `parent` is set as the path argument name, it gets passed down
through to the `create_item()` method and can erroneously reset the
`parent` value on the post itself.

Also ensures revision query params aren't exposed as the query params
for autosaves.

Originally https://core.trac.wordpress.org/attachment/ticket/43316/43316.24.diff

@danielbachhuber danielbachhuber added this to the 4.4 milestone Nov 15, 2018

@youknowriad youknowriad requested a review from WordPress/gutenberg-core Nov 15, 2018

@youknowriad

I can confirm that it works well and fixes the issue.

Code-wise, it's seems legit but I'm not the person person for this kind of changes.

@danielbachhuber

This comment has been minimized.

Member

danielbachhuber commented Nov 15, 2018

Code-wise, it's seems legit but I'm not the person person for this kind of changes.

It's also ugly and complex code, to be perfectly honest 😄

@danielbachhuber danielbachhuber merged commit ad70868 into master Nov 15, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@danielbachhuber danielbachhuber deleted the 10753-switch-to-id branch Nov 15, 2018

grey-rsi pushed a commit to OnTheGoSystems/gutenberg that referenced this pull request Nov 22, 2018

REST API: Switch away from using `parent` as the path argument name (W…
…ordPress#11914)

When `parent` is set as the path argument name, it gets passed down
through to the `create_item()` method and can erroneously reset the
`parent` value on the post itself.

Also ensures revision query params aren't exposed as the query params
for autosaves.

Originally https://core.trac.wordpress.org/attachment/ticket/43316/43316.24.diff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment