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

CLI: insert-redirect fails when using post ID #117

Open
GaryJones opened this issue Jun 28, 2023 · 0 comments
Open

CLI: insert-redirect fails when using post ID #117

GaryJones opened this issue Jun 28, 2023 · 0 comments

Comments

@GaryJones
Copy link
Contributor

$ wp wpcom-legacy-redirector insert-redirect /foo 5
Error: Couldn't insert /foo -> 5 (Redirect is pointing to a Post ID that does not exist.)

Th insert-redirect command fails when using a post ID as the To destination value. Removing a check for the $_POST superglobal, as per #115 fixes it, but then this breaks the UI view:

Screenshot 2023-06-28 at 09 02 26

(The different redirect there is using a /bar To value, rather than a post ID)

#115 was reverted in #116, but the problem still likely lies in WPCOM_Legacy_Redirector::vip_legacy_redirect_parent_id().

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

No branches or pull requests

1 participant