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) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • drupal installed in subdir .. crmAPI ajax url problem
Pages: [1]

Author Topic: drupal installed in subdir .. crmAPI ajax url problem  (Read 770 times)

pike67

  • I post occasionally
  • **
  • Posts: 55
  • Karma: 0
  • CMS version: drupal7
drupal installed in subdir .. crmAPI ajax url problem
August 31, 2012, 05:37:32 am
Hi

we have installed Drupal in a subdir (/site/) on our host. It works, except for the javascrit crmAPI getting the wrong settings.ajaxURL. as a result, http://oursite.org/site/civicrm/api/doc does nothing.

The wrong setting is found in http://oursite.org/site/sites/all/modules/civicrm/js/rest.js
line#56 : ajaxURL: '/civicrm/ajax/rest',

Where would I fix that ?

thanks,
*-pike

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: drupal installed in subdir .. crmAPI ajax url problem
August 31, 2012, 06:48:36 am
Probably won't help you right now, but we have now a more robust solution to build urls, no mater if sub folder or joomla or ...

Anyway, right now:

you should have a restURL = '....' in the source. Is this url correct for your config?

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

pike67

  • I post occasionally
  • **
  • Posts: 55
  • Karma: 0
  • CMS version: drupal7
Re: drupal installed in subdir .. crmAPI ajax url problem
September 01, 2012, 12:34:19 pm
Xavier to the rescue ! thanks :-)

In the source of the page, it says
Code: [Select]
restURL = '/site/civicrm/api/json';
thats good.

it isnt actually *used* anywhere afaics ..

if you already solved this in a later version, i can just hack it into rest.js - defaults. i guess.


thanks,
*-pike

« Last Edit: September 01, 2012, 12:45:36 pm by pike67 »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • drupal installed in subdir .. crmAPI ajax url problem

This forum was archived on 2017-11-26.