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) »
  • Wordpress: Public Petition Pages - is it possible yet? [SOLVED]
Pages: [1]

Author Topic: Wordpress: Public Petition Pages - is it possible yet? [SOLVED]  (Read 1697 times)

rainerh

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.5.34-MariaDB
  • PHP version: 5.3.27
Wordpress: Public Petition Pages - is it possible yet? [SOLVED]
April 24, 2012, 06:59:23 am
Hello everyone,

Having just moved our CiviCRM from Drupal to Wordpress, I'm having trouble showing a CiviCampaign Petition on our public website. The petition was configured as mentioned in the FLOSS manuals and was working without a problem before. I figured out that the new URL should be /?page=CiviCRM&q=civicrm/petition/sign&sid=2&reset=1
but this only works for logged in admin users. Website visitors are getting a permission denied error.

I looked everywhere to get more information about this, and it seems to me that as the CiviCRM Access Control features are not yet implemented in Wordpress, I'm out of luck here. Can anyone confirm this or maybe show me a workaround for this nasty problem (we're using CiviCRM only for this use case in the moment, so probably would have to get back to Drupal to be able to use it at all...)

thanks a lot,
rainer
« Last Edit: April 24, 2012, 10:14:23 am by rainerh »

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: Wordpress: Public Petition Pages - is it possible yet?
April 24, 2012, 07:33:23 am

this worked for me:

http://wordpress.demo.civicrm.org/?page=CiviCRM&q=civicrm/petition/sign&reset=1&sid=1

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

rainerh

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.5.34-MariaDB
  • PHP version: 5.3.27
Re: Wordpress: Public Petition Pages - is it possible yet?
April 24, 2012, 09:04:30 am
Hi Donald,

thanks for the fast reply, but on the demo page, I get exactly the same problem as on my site (following your link): if I'm logged in, I can see the petition, if not logged in, I only get:

Sorry. A non-recoverable error has occurred.
You do not have permission to access this page

can you see the petition if you log out?

rainer

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: Wordpress: Public Petition Pages - is it possible yet?
April 24, 2012, 09:34:47 am

filed and fixed here:

http://issues.civicrm.org/jira/browse/CRM-10098

the patch is fairly simple

Code: [Select]

--- CRM/Core/Permission/WordPress.php   (revision 39797)
+++ CRM/Core/Permission/WordPress.php   (working copy)
@@ -111,6 +111,7 @@
                                  'register for events'                         => 1,
                                  'view event info'                             => 1,
                                  'access Contact Dashboard'                    => 1,
+                                 'sign CiviCRM Petition'                       => 1,
                                  );
 
         }
 }

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

rainerh

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.24
  • MySQL version: 5.5.34-MariaDB
  • PHP version: 5.3.27
Re: Wordpress: Public Petition Pages - is it possible yet? [SOLVED]
April 24, 2012, 10:12:04 am
thanks a lot for the patch, I tested it and it works as advertised now  ;)

great to see that things are actively being pursued around here!

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: Wordpress: Public Petition Pages - is it possible yet? [SOLVED]
April 24, 2012, 10:44:09 am

please do pay it forward and help others and/or contribute to the project in other ways:

http://book.civicrm.org/user/civicrm-community/civicrm-community

Civi depends on the community to help with various things to make the project a success

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

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviCampaign (Moderators: Kiran Jagtap, xavier) »
  • Wordpress: Public Petition Pages - is it possible yet? [SOLVED]

This forum was archived on 2017-11-26.