qTranslate-Team / qtranslate-x

Wordpress plugin: Adds user-friendly and database-friendly multilingual content management and translation support.
http://qtranslatexteam.wordpress.com/about/
GNU General Public License v3.0
206 stars 149 forks source link

Redirection issue with Wordpress REST API and hide default language in url set to true. #427

Open esiao opened 8 years ago

esiao commented 8 years ago

When trying to fetch content with the REST API endpoint. (http://v2.wp-api.org/) There's a redirection happening, site.local.dev/en/wp-json/wp/v2/ is redirected to site.local.dev/wp-json/wp/v2/ and two errors are outputed:

( ! ) Notice: Undefined index: wp-path in [...]/plugins/qtranslate-x/qtranslate_core.php on line 953

( ! ) Warning: Cannot modify header information - headers already sent by (output started at [...]/plugins/qtranslate-x/qtranslate_core.php:953) in [...]/wp-includes/pluggable.php on line 1174

It's not possible to use the Rest API with this setting set to true, if it's set to false there's no redirection and it's working as expected.

sandrodz commented 7 years ago

I see same error on wp-admin url, using bedrock.

carlosreig commented 6 years ago

Same error wp-admin URL using bedrock

herrvigg commented 5 years ago

Hello, since qTranslate-X is not maintained and we migrated the project to qTranslate-XT i wanted to inform you i just created a PR for this issue: https://github.com/qtranslate/qtranslate-xt/pull/621

Any validation or comment would be much appreciated, thank you!