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

Offline rainerh

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress 3.3.2
  • MySQL version: 5
  • PHP version: 4.4.9
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 »

Offline Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 14701
  • Karma: 440
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Found this reply helpful? Contribute NOW and help improve CiviCRM with the Make it Happen! initiative.

Offline rainerh

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress 3.3.2
  • MySQL version: 5
  • PHP version: 4.4.9
Re: Wordpress: Public Petition Pages - is it possible yet?
« Reply #2 on: 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

Offline Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 14701
  • Karma: 440
    • 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?
« Reply #3 on: 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
Found this reply helpful? Contribute NOW and help improve CiviCRM with the Make it Happen! initiative.

Offline rainerh

  • I’m new here
  • *
  • Posts: 5
  • Karma: 0
  • CiviCRM version: 4.1.2
  • CMS version: Wordpress 3.3.2
  • MySQL version: 5
  • PHP version: 4.4.9
Re: Wordpress: Public Petition Pages - is it possible yet? [SOLVED]
« Reply #4 on: 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!

Offline Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 14701
  • Karma: 440
    • 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]
« Reply #5 on: 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
Found this reply helpful? Contribute NOW and help improve CiviCRM with the Make it Happen! initiative.