CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • REST API Possible Bug?
Pages: [1]

Author Topic: REST API Possible Bug?  (Read 980 times)

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
REST API Possible Bug?
October 22, 2011, 02:33:24 pm


URL:  http://[examplesite.com]/sites/all/modules/civicrm/extern/rest.php?q=civicrm/login&name=[user]&pass=[pass]&key=[key]ac&json=1

RETURNS:
Status code: 200 OK
Transfer-Encoding: chunked
Cache-Control: no-cache, must-revalidate, post-check=0, pre-check=0
Content-Type: text/javascript
Date: Sat, 22 Oct 2011 20:50:22 GMT
Expires: Sun, 19 Nov 1978 05:00:00 GMT
ETag: "1319316622"
Last-Modified: Sat, 22 Oct 2011 20:50:22 GMT
Server: Apache

<br />
<b>Fatal error</b>:  Class 'CRM_Utils_Request' not found in <b>/home/brazil/www/beta/sites/all/modules/civicrm/CRM/Utils/REST.php</b> on line <b>272</b><br />

---------------------------------------------------------

I added

 require_once 'CRM/Utils/Request.php';

To function handle( ) {} around line 252 in CRM/utils/rest.php and now I am all good.



Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: REST API Possible Bug?
October 23, 2011, 04:56:16 pm
If that require_once is missing in the latest version please file a bug
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: REST API Possible Bug?
October 24, 2011, 07:00:41 am
Thanks for finding this Derek, great if you can add a bug with your patch?
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: REST API Possible Bug?
October 24, 2011, 07:04:35 am
Yep, if you add a patch without a new bug we're in danger of going forwards so please always try to introduce a new bug when you eliminate an old one.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Erik Hommel

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1773
  • Karma: 59
    • EE-atWork
  • CiviCRM version: all sorts
  • CMS version: Drupal
  • MySQL version: Ubuntu's latest LTS version
  • PHP version: Ubuntu's latest LTS version
Re: REST API Possible Bug?
October 24, 2011, 07:18:04 am
Okay okay so I can not type English  :P hahaha
Consultant/project manager at EEatWork and CiviCooP (http://www.civicoop.org/)

DerekL

  • I post frequently
  • ***
  • Posts: 132
  • Karma: 1
  • CiviCRM version: 4.5.5
  • CMS version: Drupal 7.34
  • MySQL version: 5.1.54
  • PHP version: 5.2.17
Re: REST API Possible Bug?
October 25, 2011, 09:23:01 am
Will do :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • REST API Possible Bug?

This forum was archived on 2017-11-26.