1

I just upgraded to 5.8.0 and quickly noticed that my contribution pages didn't look the same. Using an html inspector the page is using just css from the joomla template and not civicrm.css. Looking at the source on the contributions page I see:

link href="/components/com_civicrm/civicrm/css/civicrm.css?r=LSlvr" rel="stylesheet" type="text/css"

However that is NOT where the civicrm.css file is located at. Its at administrator/components/com_civicrm/civicrm/css.

I "fixed" it by creating a symbolic link in webroot/components/com_civicrm to the directory in the administrator directory. (this is not the right way to fix it, but it works now!)

Is this a known problem? Is it something with my resource urls or directory settings? I've been playing with them without success.

  • I just looked at the source on the joomla demo site. There link href to the css (and others) use the administrator one. I'm on the right track, but don't have the answer yet. Why does my installation try to use a non-existent css in /components instead of /administrator/components? – Jay Edgar Dec 10 '18 at 19:54
  • My civicrm.settings.php file has: $civicrm_root = '/home/XXXX/public_html/administrator/components/com_civicrm/civicrm'; which seems right. – Jay Edgar Dec 10 '18 at 20:01
  • I have two copies of the settings file. One in administrator/components/com_civicrm/civicrm and the other in components/com_civicrm. Not sure if that is correct -but they both have the same value (and what appears to be the correct value). – Jay Edgar Dec 10 '18 at 20:04
  • And finally (perhaps) my resource urls screen shows the CiviCRM Resource URL as [civicrm.root]/ – Jay Edgar Dec 10 '18 at 20:06
  • Just realized the Joomla demo is using civicrm 5.5.3 so its not an apples to apples test. I didn't see the problem until I upgraded. I could roll back - but my hack has it working for now. – Jay Edgar Dec 10 '18 at 20:17
1

I fixed it. I opened Administer -> System Settings -> Resource URLs.

I then changed CiviCRM Resource URL from [civicrm.root]/ to administrator/components/com_civicrm/civicrm/

I then removed my hack (the symbolic link), refreshed the contribution page and all is well. I also verfied by looking at the source for the contribution page and it show the correct urls for css and jquery now.

  • Yes, I've encountered the same thing - the variable [civicrm.root] is not evaluated correctly. Now logged as lab.civicrm.org/dev/joomla/issues/5 – Aidan Dec 11 '18 at 16:27
  • I confirm that this is a problem on a new CiviCRM 5.8 installation on Joomla 3.9.1. On my own site I had been using the relative URL administrator/components/com_civicrm/civicrm/ (I thought necessary due to my unusual two-headed install). Looking at the history of Civi/Core/Paths.php and CRM/Utils/System/Joomla.php (which seem like the obvious places) nothing relevant seems to have changed for a while so, unless it's somewhere else, it's probably not new to 5.8. – Andrew Thompson Dec 12 '18 at 4:59
  • I confirm @AndrewThompson's experience: on a new site it defaults to [civicrm.root]/ and that loads the wrong path front-end. On my two older and upgraded latest Civi/Joomla sites the relative URL has been there and there's no problems. I'm not sure when the relative URL was put there — I don't remember doing it myself but this sites have been running Civi a long time so it's not impossible. – Nic Dec 12 '18 at 9:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.