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 »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Problem adding links to Civi page to the Drupal menu
Pages: [1]

Author Topic: Problem adding links to Civi page to the Drupal menu  (Read 2360 times)

joachim

  • Guest
Problem adding links to Civi page to the Drupal menu
July 16, 2008, 02:28:41 am
I'm trying to add links for some Civi pages to the Drupal menu and running into some sort of escaping problem:

I add a menu item with a path of civicrm/user?reset=1, but when I click on the link the browser tries to load civicrm/user%3Freset%3D1. Civi appears to treat this like an unknown path and defaults to the Civi Home page at civicrm/dashboard?reset=1

I'm guessing some sort of escaping of the ? and = is needed, but how?

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem adding links to Civi page to the Drupal menu
July 16, 2008, 02:58:58 am
IMO, that's a more of a Drupal issue..  it converts ? to %3 automatically..

kurund
Found this reply helpful? Support CiviCRM

joachim

  • Guest
Re: Problem adding links to Civi page to the Drupal menu
July 16, 2008, 03:02:40 am
Yeah, it's Drupals menu system that's doing that conversion.
But I was wondering if any civi/drupal users have had the same problem and how they've got round it ...  :)

Kurund Jalmi

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4169
  • Karma: 128
    • CiviCRM
  • CiviCRM version: 4.x, future
  • CMS version: Drupal 7, Joomla 3.x
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Problem adding links to Civi page to the Drupal menu
July 16, 2008, 03:58:20 am
IMO, best solution would be hard coding links in template.. :(

kurund
Found this reply helpful? Support CiviCRM

MiamiRon

  • I’m new here
  • *
  • Posts: 16
  • Karma: 0
Re: Problem adding links to Civi page to the Drupal menu
July 16, 2008, 07:56:34 am
I've had the same problem. Here's what you have to do (thanks to Gregory Heller at CivicActions):

Create a page node, select php for the input format and use the drupal goto function like this:

<? php
drupal_goto($path = 'civicrm/contribute/transact', 'reset=1&id=1')
?>


where the url for the civicrm contribution form is mysite.com/civicrm/contribute/transact?reset=1&id=1

Either use the menu feature of nodes (where in the node add/edit form you create your menu item) or visit admin/build/menu to add a menu item for your drupal page node you just created.

geilhufe

  • I post frequently
  • ***
  • Posts: 293
  • Karma: 33
    • Social Source Software
Re: Problem adding links to Civi page to the Drupal menu
July 16, 2008, 11:16:58 am
This is a known drupal bug that has been around for a few years.

http://drupal.org/node/118072
(links to various other issues linked from this issue)

In theory this has been resolved in Drupal 6. It would be helpful if someone could test and verify it is fixed in Drupal 6/ CiviCRM 2.1. I don't have a test development account I can test :(

Drupal and CiviCRM consulting, strategy and configuration
http://www.social-source.com/

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: Problem adding links to Civi page to the Drupal menu
July 16, 2008, 12:40:35 pm
I've been meaning to verify this fix for a while... and IT'S TRUE... You will be able to use relative CiviCRM URLs as paths for Drupal menu items. I just tested with CiviCRM trunk (2.1 development) and Drupal 6.2 - and added a link to an online contribution page using this path:

civicrm/contribute/transact?reset=1&action=preview&id=1

It works perfectly :-)

BTW in Drupal 5.x I'm pretty sure you CAN use CiviCRM links without them getting "mangled" BUT you have to use the full URL (e.g. http://yoursite.org/civicrm/.... ).
Protect your investment in CiviCRM by  becoming a Member!

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Post-installation Setup and Configuration (Moderator: Dave Greenberg) »
  • Problem adding links to Civi page to the Drupal menu

This forum was archived on 2017-11-26.