Support

Home Forums Event Espresso Premium Error – "You cannot have WP API v1 and v2 active simultaneously"

Error – "You cannot have WP API v1 and v2 active simultaneously"

Posted: March 8, 2019 at 8:40 am

Viewing 7 reply threads


KLLASC

March 8, 2019 at 8:40 am

I was able to log into the EE Mobile App previously.

After installing the plugin WPO365 to enable single sign on with our Azure AD, the app is now presenting “You cannot have WP API v1 and v2 active simultaneously. Please deactivate WP API v1 plugin or refer to Mobile App documentation for other options.”

When I disabled WPO365, I am able to log into the EE Mobile App.

Other than the different methods for authentication, I have not been able to find any specific information to resolve the above issue.

Grateful if you would advise on how I can resolve the issue.


Josh

  • Support Staff

March 8, 2019 at 10:59 am

Hi,

Have you checked with the developer of the WPO365 plugin to see if they can make it so the plugin does not interfere with authenticated requests to the WordPress REST API?


KLLASC

March 10, 2019 at 9:42 pm

Hi,
The WPO365 developer had advised to exclude paths like /wp/v2 and even /wp-json/wp/v2/ so as to bypass his plugin checking for authentication.

Would you advise which paths/folders/pages that the EE Mobile App is assessing so we can exclude them from WPO365 please?

Thanks.


Josh

  • Support Staff

March 11, 2019 at 9:58 am

Hi,

The mobile apps send requests to /wp-json/ee/*


KLLASC

March 12, 2019 at 4:09 am

Hi Josh, I have added the path “/wp-json/ee/” to the WPO365 blackist, the issue remains.

Just to verify, when I load the URL “http://asc.keppelland.com/index.php/wp-json/ee/”, I get the following, is this expected result?

{“code”:”rest_no_route”,”message”:”No route was found matching the URL and request method”,”data”:{“status”:404}}


Josh

  • Support Staff

March 12, 2019 at 6:31 am

This doesn’t appear to be an issue that EE can fix since the other plugin’s deactivation fixes the issue. Your incomplete GET request would be expected to result in a 404 error, here are a few examples you can try instead:

Discovery endpoint:
http://asc.keppelland.com/index.php/wp-json/ee/v4.8.36/

Events:
http://asc.keppelland.com/index.php/wp-json/ee/v4.8.36/events/

Site info:
http://asc.keppelland.com/index.php/wp-json/ee/v4.8.36/site_info


KLLASC

March 12, 2019 at 7:28 pm

Thanks Josh for your unyielding support!

We now able to log into the app after appending “/login” to the Website URL i.e. “asc.keppelland.com/login” instead of just “asc.keppelland.com”.

However, at the loading screen, it says “Connection error. Unable to load data”. Would you be able to shed some light on this please, such as the difference between the login and the loading? It is possible while loading, the app is accessing a path that we have not “blacklisted”/excluded from the other plugin.

Thank you.


Josh

  • Support Staff

March 13, 2019 at 8:03 am

The app does not use the /login route because technically, it does not log you into the WP dashboard. It only uses the log in credentials to send along with the request. The other plugin must be interfering with that process and will need to stop doing that in order to allow you to use the app.

Viewing 7 reply threads

The support post ‘Error – "You cannot have WP API v1 and v2 active simultaneously"’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso