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) »
  • Has anyone solved the URL Alias/menu and question marks issue?
Pages: [1]

Author Topic: Has anyone solved the URL Alias/menu and question marks issue?  (Read 11053 times)

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Has anyone solved the URL Alias/menu and question marks issue?
January 30, 2008, 07:43:35 am
Hi,

Using civicrm 1.9 and Kabissa module developed by the civicrm team.
 
I am continually struggling with an issue on my site relating to URL Aliases and menu items and civicrm URLs requiring question marks and ampersands in the URLs. This does not work due to an apparent bug in drupal, as explained here. I want to link to civi on the menu, and also create attractive URLs for various civi pages - and am unable to do this.

Ideally I would do this in a drupal way and on an ongoing basis as needed - ie using the menu admin and url aliases.

We can't turn off clean urls.

The solution we found last fall for this is too cumbersome for the number of links I want to set up. Back then we created an empty page containing code like this: 

Code: [Select]
<?php 
  
{header ("Location: http://foo.bar.org/civicrm/kabissa/signup?reset=1&action=add"); exit;}
?>


Especially because these civicrm links don't work in menus either, we are in urgent need of a solution that works! 

Cheers,

Tobias
Kabissa - Space for Change in Africa http://kabissa.org

catya

  • I’m new here
  • *
  • Posts: 17
  • Karma: 0
Re: Has anyone solved the URL Alias/menu and question marks issue?
January 30, 2008, 11:10:37 am
We're doing roughly the same workaround - a redirect page that has

[!--break--]
[?php drupal_goto('civicrm/profile/create', 'reset=1&gid=2'); ?]

Which corresponds to the URL /civicrm/profile/create?reset=1&gid=2. Note that there are two parameters to the function; they are the two halves of the URL if you split it at the question mark.

Then we point the menu to the redirect page...

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: Has anyone solved the URL Alias/menu and question marks issue?
January 30, 2008, 01:56:31 pm
I've tried to get Drupal devs to look at this, but there is no one that I can convince to spend some time.
It is also part of Drupal core, so any changes will not come out till Drupal 7.

Any php devs want to look at path.inc in Drupal core and figure out what is stripping the "?" character from submitted URLs? I suspect it is some sanitizing function for user submitted content.
Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: Has anyone solved the URL Alias/menu and question marks issue?
February 06, 2008, 10:02:54 pm
thanks catya and david - these are helpful. glad to know i'm not alone here! ;-)

I handled it myself using a redirect in .htaccess. Easier to manage a list of redirects there than to create a list of drupal pages that I will lose track of.

Cheers,

Tobias
Kabissa - Space for Change in Africa http://kabissa.org

sonicthoughts

  • Ask me questions
  • ****
  • Posts: 498
  • Karma: 10
Re: Has anyone solved the URL Alias/menu and question marks issue?
April 13, 2008, 09:26:04 pm
I'm having the same trouble - want to create a custom menu with deep links. The '?' messes up the URL alias mechanism in drupal also.  will post if i find a clean work-around.

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: Has anyone solved the URL Alias/menu and question marks issue?
April 14, 2008, 08:12:19 am
The closest thing to a solution is presented in a comment here:

http://drupal.org/node/118072

The safest thing, still, is to use URL redirects in .htaccess.

Cheers,

Tobias
Kabissa - Space for Change in Africa http://kabissa.org

dbabbage

  • I’m new here
  • *
  • Posts: 14
  • Karma: 1
Re: Has anyone solved the URL Alias/menu and question marks issue?
March 27, 2009, 02:46:12 pm
This issue has apparently been solved in Drupal 6 and CiviCRM 2.2 (or may have been 2.1). However, it wasn't working for me.

I was trying to alias the following url in D6: http://example.com/civicrm/event/register?id=1&reset=1
I wanted it to display as: http://example.com/events/2009/conference/register

It wasn't working. Instead it was redirecting to the event configuration page. However, I stumbled upon a solution. If I set the url to alias as: http://example.com/civicrm/event/register/?id=1&reset=1
...with an extra slash after the "register", it then redirects correctly to: http://example.com/events/2009/conference/register?id=1

Which works! I don't know if the dropping of the &reset=1 is of significance, but so far it appears to work. So this seems to be a bug, but it's a pretty easy one to work around until it can be fixed.

My original post in the drupal.org issue queues detailing this:
http://drupal.org/node/118072#comment-1409082
« Last Edit: March 27, 2009, 02:47:51 pm by dbabbage »

tobiaseigen

  • I post frequently
  • ***
  • Posts: 151
  • Karma: 5
    • Kabissa - Space for Change in Africa
Re: Has anyone solved the URL Alias/menu and question marks issue?
March 29, 2009, 01:01:05 pm
GREAT! Glad to hear this is solved in drupal 6 and  civi 2.2. It means alot to me, and we are moving to those versions at Kabissa. 

Still seems a little kludgy, but at least we're able to create aliases within drupal. 

Cheers,

Tobias
Kabissa - Space for Change in Africa http://kabissa.org

hintbw

  • I’m new here
  • *
  • Posts: 20
  • Karma: 1
    • AzTEA
Re: Has anyone solved the URL Alias/menu and question marks issue?
April 07, 2009, 09:13:54 am
Any thoughts from any core developers on the question of whether dropping the &reset=1 on civievent forms will cause issues? What does this parameter actually do? The URL shortening below works well but I don't want the dropping of the &reset=1 to come back and bite me.



Quote from: dbabbage on March 27, 2009, 02:46:12 pm
This issue has apparently been solved in Drupal 6 and CiviCRM 2.2 (or may have been 2.1). However, it wasn't working for me.

I was trying to alias the following url in D6: http://example.com/civicrm/event/register?id=1&reset=1
I wanted it to display as: http://example.com/events/2009/conference/register

It wasn't working. Instead it was redirecting to the event configuration page. However, I stumbled upon a solution. If I set the url to alias as: http://example.com/civicrm/event/register/?id=1&reset=1
...with an extra slash after the "register", it then redirects correctly to: http://example.com/events/2009/conference/register?id=1

Which works! I don't know if the dropping of the &reset=1 is of significance, but so far it appears to work. So this seems to be a bug, but it's a pretty easy one to work around until it can be fixed.

My original post in the drupal.org issue queues detailing this:
http://drupal.org/node/118072#comment-1409082

---
Brett

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Has anyone solved the URL Alias/menu and question marks issue?
April 07, 2009, 09:45:37 pm

basically reset=1 clears out the session scope for that page. So in case someone revisits the page, the old information is cleared out.

We recommend you do not omit "reset=1" from the url. at some point it will land u in trouble :)

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

jugney

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
Re: Has anyone solved the URL Alias/menu and question marks issue?
September 27, 2009, 03:55:24 pm
Just wanted to point out for users who might come across this thread in the future, this does not work on 3.0 (beta). At least, in some browsers. It works in Firefox and Safari but not versions of Internet Explorer.

duncanc

  • Guest
Re: Has anyone solved the URL Alias/menu and question marks issue?
April 17, 2010, 09:11:52 am
I had a simlar problem wanting to have an alias to allow user registration
signup to be an alias for civicrm/profile/create&reset=1&gid=7

I've found what I think is a proper solution by implementing the custom_url_rewrite_inbound() function and have posted it on the Drupal issues forum, see http://drupal.org/node/118072#comment-2857522


datakid

  • I post occasionally
  • **
  • Posts: 35
  • Karma: 0
Re: Has anyone solved the URL Alias/menu and question marks issue?
May 06, 2010, 11:37:52 pm
Quote from: duncanc on April 17, 2010, 09:11:52 am

I've found what I think is a proper solution by implementing the custom_url_rewrite_inbound() function and have posted it on the Drupal issues forum, see http://drupal.org/node/118072#comment-2857522


Did you get it to work? I'm looking for a solution to this as well :)

cheers
L.

Remixen

  • Guest
Re: Has anyone solved the URL Alias/menu and question marks issue?
August 16, 2010, 12:09:19 am
I am trying to create a path alias for "civicrm/contribute/transact?reset=1&id=4"

I have tried escaping the characters without result. It seems like the alias works all the way up the the "?" then basically doesn't pass any of the arguments past the "?".

I am thinking this might be related to clean URLs and .htaccess doing something to the question mark. I am not a programmer, but more that willing to test and debug if provided a little direction.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • Drupal Installations (Moderator: Piotr Szotkowski) »
  • Has anyone solved the URL Alias/menu and question marks issue?

This forum was archived on 2017-11-26.