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

Can't generate key-pairs if wordpress is installed in a subfolder #19

Open
cientista opened this issue Oct 8, 2019 · 1 comment
Open

Comments

@cientista
Copy link

cientista commented Oct 8, 2019

I have some Wordpress installations in different subfolders and when why try generate key-pairs in the profile page nothing happens.
After inspect the network request in browser inspector I noted that the subfolder is ignored on the request so it returns a 404.

For example the request made in "http://local.lab/wpapi/wp-admin/profile.php" on submission it requests on "http://local.lab/wp-json/wp/v2/key-pair/1" which returns a 404.

I don't know if is a mistake on my side but I tested in other server who also use the same installation system and the result is the same.

Thank you.

@cientista cientista changed the title Can't generate key-pairs if wordpress is in a subfolder Can't generate key-pairs if wordpress is installed in a subfolder Oct 8, 2019
@cientista
Copy link
Author

I temporary made it work editing the file "class-wp-rest-key-pair.php" adding my subdirectory in line 80 changing "$prefix = rest_get_url_prefix();" to "$prefix = "wpapi/" . rest_get_url_prefix();".
After this change I can generate key-pairs normally.

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

No branches or pull requests

1 participant