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 »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • Petition email confirmation link 404 - please help!
Pages: [1]

Author Topic: Petition email confirmation link 404 - please help!  (Read 733 times)

Laurie

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.5.2.
  • CMS version: WordPress 4.0.1
Petition email confirmation link 404 - please help!
November 20, 2014, 08:10:24 pm
Users get a 404 when they click the email confirmation link after signing the petition and I can't find where to fix the URL. Lots of people trying to sign right now so help would be much appreciated! Thanks!

This is the URL you are taken to when you try to confirm:

http://www.fossilfreeca.org/hello-world/?page=CiviCRM&q=civicrm%2Fpetition%2Fconfirm&reset=1&cid=16&sid=7&h=98d81176ea234f19&a=13

This is the Petition URL:


http://www.fossilfreeca.org/petition/
« Last Edit: November 20, 2014, 08:20:44 pm by Laurie »

bsilvern

  • I’m new here
  • *
  • Posts: 14
  • Karma: 2
  • CiviCRM version: 4.6
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.37-0+wheezy1
  • PHP version: 5.4.4-14+deb7u10
Re: Petition email confirmation link 404 - please help! [SOLVED]
November 21, 2014, 09:06:22 am
This problem is caused when Civi is installed as a WordPress plugin due to the Civi-generated petition email confirmation URL including "p" as parameter, e.g. "&p=1". WordPress uses the p parameter as a shortcut to a post or page, so a URL which contains "p=1" indicates to WordPress to display Post #1. In your case this post was titled "Hello world". The 404 occurred because that page has been moved to the trash, but its title and page number remain in the database causing the redirect to a non-existing page.

You can work around this by replacing "p" with another symbol, e.g. "p1" as shown in the attached patch files which apply to the following files in Civi 4.5.2:
  • civicrm/CRM/Campaign/BAO/Petition.php
  • civicrm/CRM/Campaign/Page/Petition/Confirm.php

 
« Last Edit: November 21, 2014, 09:08:24 am by bsilvern »

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Petition email confirmation link 404 - please help!
November 24, 2014, 12:19:27 am
Hey there,

Not sure if this is issue has been sumbitted to the issue tracker but would make sense for you to add it if not, to save yourself (and others) having to deal with this again when you upgrade.

Michael
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

bsilvern

  • I’m new here
  • *
  • Posts: 14
  • Karma: 2
  • CiviCRM version: 4.6
  • CMS version: Drupal 7.36
  • MySQL version: 5.5.37-0+wheezy1
  • PHP version: 5.4.4-14+deb7u10
Re: Petition email confirmation link 404 - please help!
November 25, 2014, 09:58:21 am
Submitted CRM-15645: https://issues.civicrm.org/jira/browse/CRM-15645

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Petition email confirmation link 404 - please help!
December 01, 2014, 09:21:39 am
Thanks :)
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Laurie

  • I’m new here
  • *
  • Posts: 15
  • Karma: 1
  • CiviCRM version: 4.5.2.
  • CMS version: WordPress 4.0.1
Re: Petition email confirmation link 404 - please help!
December 17, 2014, 03:45:03 pm
Thank you bsilvern!  :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • Petition email confirmation link 404 - please help!

This forum was archived on 2017-11-26.