Fix the post update/create --tax_input option#207
Fix the post update/create --tax_input option#207drzraf wants to merge 8011 commits intowp-cli:masterfrom
Conversation
danielbachhuber
left a comment
There was a problem hiding this comment.
Thanks for the pull request, @drzraf. Can you submit a test case for this? Also, it looks like your formatting may be off.
f0e2ed6 to
367decf
Compare
|
Behat won my patience. I couldn't get the STDERR to match Exception nor could the term be inserted during the test. Actually my use-case is for a custom taxonomy where I was able to get it working using ID. |
|
I fixed the first failure, but the second one seems to replicate what I had initially encountered when I add support for JSON-encoded array passing. The pull request in #133 originally included |
|
I did some more digging, and the actual problem is that the capability check for |
|
@johnbillion you introduced the more fine-grained capabilities for taxonomies, so I suppose you know what the expected behavior is. Currently, the WP-CLI code to use Is that meant to be the case, or is this a bug in Core? |
|
AFAICT @johnbillion does not seem subscribed to this PR |
|
The What's the error that's occurring here? Is that capability check definitely the part that's failing? |
|
The capability check is failing in this context because there's no As a workaround, WP-CLI could filter the capability check on the fly. Or, we could simply document that |
|
Thanks for the link to that ticket, @danielbachhuber, that helps a lot! @johnbillion I still consider this a bug. This is the current behavior I observe:
Why would the general-purpose syntax only work for non-built-ins and break for |
|
Additional note: |
Worth noting before we invest too much time trying to change core: "bugs" in 7+ year old code generally aren't fixed because of the costs of unknown, unintended consequences generally outweigh the benefits. You'll find some number of workarounds in WP-CLI "correcting" WordPress' behavior. |
|
@danielbachhuber Yes, I completely agree. I just want to make sure it is properly flagged as a bug in Trac if that's the case. We'll need to find a workaround nevertheless, though. |
Delete alert in case of custom post type
Include 'supports' field when fetching a single post type
Co-Authored-By: Mte90 <mte90net@gmail.com>
Add application password commands
Recalculate menu order on insertion or deletion
61e3828 to
34888d6
Compare
|
Proceeding with wp-cli/wp-cli#5594 for this repository. I've captured this PR to https://gist.github.com/danielbachhuber/9299d3d83d7947472df3545fe87b821b in case this PR is auto-closed or broken in some way. |
1bd9e2e to
39d420e
Compare
|
I gave it a quick look but it sounds that the merge conflicts more than what my mind is able to remember regarding this PR. Sorry. |
|
@drzraf I Tested splaying the diff to to latests |
Fix the post update/create --tax_input option to actually decode expected json