Clean URLs, question marks and civicrm

Events happening in the community are now at Drupal community events on www.drupal.org.
tobias's picture

Hey folks,

I have been struggling with an issue on my drupal/civicrm site and thought I'd resort to asking my local community for help. I'm using Drupal 5, clean urls, and civicrm 1.9 (with a module created for Kabissa). Basically, I'd like to create url aliases for many key civicrm functions, and then create menu items to link to those url aliases. I am running into difficulties because drupal with clean urls doesn't recognize questionmarks and ampersands in URLs, and civicrm requires them to display correctly.

It appears to me that the only way to go is to create a long list of redirects in the .htaccess file and that's what I'm going to try next.. but of course it seems more than a little clunky. Is there not a drupally way to do this?

My question on forum.civicrm.org:
http://forum.civicrm.org/index.php/topic,2165.0.html

And to the civicrm mailing list:
http://www.nabble.com/Re:-Problem-with-Drupal-alias---CiviCRM-profil-td1...

And the apparent drupal bug on issue tracker:
http://drupal.org/node/118072

Cheers,

Tobias

Comments

absolute URLS

omniverse's picture

Try using an absolute menu URL for the civi link instead of a relative one such as: http://mysite.com/civicrm/profile?gid=14&reset=1&force=1

thanks but no..

tobias's picture

Thanks for trying to help -

The issue is with the way drupal handles questionmarks - for some reason it will not let you put urls with question marks in menus or URL aliases. I am currently handling it via .htaccess redirects which I can live with (barely but I'm getting used to the idea). More info and pleas to fix this in drupal core is available on the civicrm forum and in the drupal issue tracker.

Cheers,

Tobias

oh yeah, now i found my ugly hack

omniverse's picture

.htaccess is probably not a bad solution. I saw your post about using

<?php

 
{header ("Location: http://foo.bar.org/civicrm/kabissa/signup?reset=1&action=add"); exit;}
?>
and that seems like a decent option, too. I bit easier to track down later on.

I just found my hack, which involved having CiviCRM set a global variable and then rewriting Drupal's menus in a template.php so Drupal would know the active menu item. Ugh.

I had also tried creating a url alias for the CiviCRM profile page. The URL alias does let you map to a system link with a '?', but then CiviCRM isn't able to pull out the query params.

Seattle

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: