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 (Moderator: Donald Lobo) »
  • Fix for broken Calendar widget
Pages: [1]

Author Topic: Fix for broken Calendar widget  (Read 1203 times)

ceford

  • I’m new here
  • *
  • Posts: 20
  • Karma: 2
Fix for broken Calendar widget
November 02, 2009, 08:33:40 am
There is a Calendar widget on Profile pages. It did not work on my site and several other seem to have had the same problem. I traced it to:

administrator/components/com_civicrm/civicrm/js/lang/calendar-lang.php

The line that says require_once '../../civicrm.config.php'; doesn't work (something to do with open_basedir).

This does:

require_once($_SERVER['DOCUMENT_ROOT'].'/../../civicrm.config.php');

although I don't know if it is a good fix or not.

Another thought: would it be better to have Javascript and css files that get called from the Joomla front end in the site branch rather than the administrator branch? I had extra .htaccess protection on the administrator directory until I needed to use front-end Profile forms. Got to move stuff to keep that.

Cliff

lcdweb

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1620
  • Karma: 116
    • www.lcdservices.biz
  • CiviCRM version: many versions...
  • CMS version: Joomla/Drupal
  • MySQL version: 5.1+
  • PHP version: 5.2+
Re: Fix for broken Calendar widget
November 02, 2009, 08:42:45 am
Cliff,

In Joomla-world (of which I'm part) it would definitely be preferable to have all the front-facing stuff in the components directory rather than administrator. But because Civi is CMS-agnostic, I don't think that's easily feasible (though there have been discussions among some in the community to build an MVC structure for the frontend in order to improve this).

I've run into the htaccess problem you're referencing. A workaround is to add a directive to exclude administrator/components/com_civicrm/ from the additional security. Try this, below the directives implementing htaccess auth:

Code: [Select]
<Directory /public/www/htdocs/administrator/components/com_civicrm/>
Satisfy Any
Allow from all
</Directory>

(with the correct file path, of course).
support CiviCRM through 'make it happen' initiatives!
http://civicrm.org/mih

ceford

  • I’m new here
  • *
  • Posts: 20
  • Karma: 2
Re: Fix for broken Calendar widget
November 04, 2009, 06:24:00 am
Thanks for the tip about using htaccess.

It turns out my original post was complete rubbish! The problem was actually lax directory permissions that caused the hosting service server to throw an Internal Server 500 error. All I noticed from the front end was that the Javascript widget did not work. I should have looked at the Server Error log sooner.

Cliff

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Fix for broken Calendar widget

This forum was archived on 2017-11-26.