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 »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Interoperability between CiviCRM and sh404SEF
Pages: [1]

Author Topic: Interoperability between CiviCRM and sh404SEF  (Read 1946 times)

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Interoperability between CiviCRM and sh404SEF
July 04, 2009, 12:38:30 am
I'm posting this to explain what I've done to get CiviCRM and sh404SEF to work together. I still have a few concerns, so maybe this will take people along a road rather than to a destination. I hope others can contribute further ideas.

This is a list of issues I had, with a discussion of how I (hopefully) resolved them. (Note that I added sh404SEF to a working CiviCRM site. You might have different issues adding CiviCRM to a sh404SEF site.)

  • CiviCRM links not working: sh404SEF rewrites URLs and doesn't play nice with CiviCRM. In the sh404SEF configuration, on the "By Component" tab, set CiviCRM to "skip".
  • Secure pages give an 'unauthenticated content' warning: Contribution pages and registration pages were displayed with a browser warning about unauthenticated content. (The risk is that visitors might decide not give credit card details on an apparently insecure page.) In my case it was an image being called up from the Joomla! template. Here's what happened: sh404SEF requires $live_site to be set to "http://my.site.org" in configuration.php; this causes JURI::Base to return "http://my.site.org/" rather than "/"; my Joomla! site template prefixed the CSS URL with JURI::Base(); all images called up by the CSS were fixed to be "http" and not "https" by default; and hence the unauthenticated content. To fix this I changed the Joomla! site template to use relative rather than absolute URLs when calling up CSS resource (ie, replacing "JURI::Base().'template/'..." with "'/template/'...").
  • Can't use sh404SEF to create links to secure CiviCRM pages: Doing this results in a fatal error "HTTPS not set up on this machine". To fix this, 2 changes are needed. Firstly, apply the patches to CRM/Utils/System.php which were made in issue CRM-4447 (or upgrade to 2.2.4). This change means that CiviCRM is testing the right URL before attempting to redirect to a HTTPS page. Secondly, configure sh404SEF so that the parameter "301 redirect from non-sef to sef URL" on the "Advanced" tab is set to "No". This prevents sh404SEF returning a 302 response which CiviCRM interprets as "HTTPS not set up".
  • Once a https page has been visited the site stays in https mode: This is a side-effect of the changes suggested in the previous point. Without those changes, when a visitor clicks on a non-secure link on a https page, they get returned to http. With the changes in place, the visitor will stay in https until they click on a link to the home page (which sh404SEF treats as a special case). I find this annoying but not a show-stopper.

Ken
« Last Edit: July 18, 2009, 10:31:45 pm by ken »

ken

  • I live on this forum
  • *****
  • Posts: 916
  • Karma: 53
    • City Bible Forum
  • CiviCRM version: 4.6.3
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.41
  • PHP version: 5.3.10
Re: Interoperability between CiviCRM and sh404SEF
July 18, 2009, 10:24:45 pm
I've just updated the original post to show how to use sh404SEF to create links to secure CiviCRM pages.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Joomla! Installations (Moderator: Deepak Srivastava) »
  • Interoperability between CiviCRM and sh404SEF

This forum was archived on 2017-11-26.