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

Fix REST on WordPress #14186

Merged
merged 1 commit into from
May 2, 2019
Merged

Fix REST on WordPress #14186

merged 1 commit into from
May 2, 2019

Conversation

MegaphoneJon
Copy link
Contributor

Overview

Civi 5.13.0 broke the REST endpoint on WordPress.

Before

A call like: http://wpmaster.localhost/wp-content/plugins/civicrm/civicrm/extern/rest.php?entity=system&action=check&key=cTJjAAadwbEB2n5w&api_key=54321

results in a 500 error with stack trace:

#0 /var/www/9to5.org/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System.php(1474): CRM_Utils_System_WordPress->loadBootStrap(Array, true, false, NULL)
#1 /var/www/9to5.org/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/REST.php(640): CRM_Utils_System::loadBootStrap(Array, true, false)
#2 /var/www/9to5.org/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/REST.php(114): CRM_Utils_REST->loadCMSBootstrap()
#3 /var/www/9to5.org/htdocs/wp-content/plugins/civicrm/civicrm/extern/rest.php(42): CRM_Utils_REST->bootAndRun()
#4 {main}
  thrown in /var/www/9to5.org/htdocs/wp-content/plugins/civicrm/civicrm/CRM/Utils/System/WordPress.php on line 476

After

REST endpoint works as expected.

Technical Details

This commit declared an exception when loading the CMS bootstrap by uid as "not implemented". So I implemented it and removed the exception :)

@civibot
Copy link

civibot bot commented May 2, 2019

(Standard links)

@civibot civibot bot added the 5.13 label May 2, 2019
@JoeMurray
Copy link
Contributor

@eileenmcnaughton @totten @kcristiano this seems important enough to make an announcement and quick fix release.

@seamuslee001
Copy link
Contributor

from @kcristiano on mattermost "The PR makes sense to me, but I am not in a position to run a test. Looks like I need to add REST Calls to the testing checklist"

@seamuslee001
Copy link
Contributor

have also tested this using the E2E Matrix in test.civicrm.org and it fixes some of the tests there and seems to be sensible change to me

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@eileenmcnaughton
Copy link
Contributor

@seamuslee001 has this been merged to the rc?

@seamuslee001
Copy link
Contributor

yes #14189

@totten
Copy link
Member

totten commented May 2, 2019

have also tested this using the E2E Matrix in test.civicrm.org and it fixes some of the tests there and seems to be sensible change to me

Oooh, nice. So we're now only one test away from a green E2E matrix. :)

@totten
Copy link
Member

totten commented May 2, 2019

Reported failure is a common false-negative.

@seamuslee001
Copy link
Contributor

Test fail unrelated merging

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

Successfully merging this pull request may close these issues.

5 participants