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 »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Pluggable error on civi pages in posts
Pages: [1]

Author Topic: Pluggable error on civi pages in posts  (Read 1538 times)

biologyben

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Wordpress 4.0
Pluggable error on civi pages in posts
March 18, 2013, 08:53:05 pm
Just installed civi on wp 3.5.1 and when adding an event page via the little logo next to media in the add pages area, I get an error code about pluggable.php not found on line 367

I see the event preview when managing the event, but the 'tell your friends' link is incorrect.  Are these two related?  Where should I start?

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: Pluggable error on civi pages in posts
March 18, 2013, 09:52:47 pm

not exactly sure i understand what you tried. Can you try repeating the same experiment on our sandbox server and give us step by step instructions on how to reproduce the error

lobo

p.s> i tried doing what u said locally and could not reproduce
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

biologyben

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Wordpress 4.0
Re: Pluggable error on civi pages in posts
March 20, 2013, 05:01:28 am
To further explain what I did  --  I created a new event to test functionality and the event page looks fine from the admin side (Civicrm > manage events > Event name)

When I create a new page in WP, i use the button to insert the shortcode ([civicrm component="event" id="1" mode="test" action="info"]) and publish the page.  At this point, the page has the error:

Warning: require_once(wp-includes/pluggable.php): failed to open stream: No such file or directory in /webroot/b/g/site/primary/www/wp/wp-content/plugins/civicrm/civicrm.php on line 362 Fatal error: require_once(): Failed opening required 'wp-includes/pluggable.php' (include_path='.:/webroot/b/g/site/primary/www/wp/wp-content/plugins/civicrm/civicrm/:/webroot/b/g/site/primary/www/wp/wp-content/plugins/civicrm/civicrm//packages:.:/usr/share/pear:/usr/share/php53/pear') in /webroot/b/g/site/primary/www/wp/wp-content/plugins/civicrm/civicrm.php on line 362

The WP install is not at root but at url. com/wp and is set up such in the general settings:
 
Wordpress Address (URL): url. com/wp
Site Address (URL): url. com

A post from years ago said that could cause problems as civicrm would not expect such an install - is that still the case?  Also seems very similar to http://forum.civicrm.org/index.php/topic,23988.msg101025.html#msg101025 but we are not using that plugin

Of course, the demo site works properly.

P.S. why does using the CODE tag bring errors about external links on this forum?
« Last Edit: March 20, 2013, 05:16:07 am by biologyben »

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: Pluggable error on civi pages in posts
March 20, 2013, 08:00:51 am
can you try the following patch:

Code: [Select]
diff --git a/civicrm.php b/civicrm.php
index 247303f..53f086c 100644
--- a/civicrm.php
+++ b/civicrm.php
@@ -371,7 +371,7 @@ function civicrm_wp_frontend($shortcode = FALSE) {
     return;
   }

-  require_once 'wp-includes/pluggable.php';
+  require_once ABSPATH . WPINC . '/pluggable.php';

   // if snippet is set, which means ajax call, we just
   // output civicrm html and skip the header

if this works, can you please post an issue on the issue tracker and reference this forum post

thanx

lobo

p.s> the forum is another open source project  (simple machines forum). As you post more, it allows you to use external links etc
« Last Edit: March 20, 2013, 11:53:31 am by Donald 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

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: Pluggable error on civi pages in posts
March 20, 2013, 09:53:51 am

filed an issue for this here:

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

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

biologyben

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Wordpress 4.0
Re: Pluggable error on civi pages in posts
March 20, 2013, 11:44:48 am
Sorry to be dense, but shall I put this just anywhere in the main civicrm.php code via the wp plugin editor or somewhere else?

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: Pluggable error on civi pages in posts
March 20, 2013, 11:56:00 am

You replace the lines specified in the diff with the new lines. The - is the old, The + is the new

you can read more here:

http://en.wikipedia.org/wiki/Patch_(Unix)
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

biologyben

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Wordpress 4.0
Re: Pluggable error on civi pages in posts
March 20, 2013, 07:37:09 pm
So replacing line 363:

Code: [Select]
require_once 'wp-includes/pluggable.php';
with:

Code: [Select]
require_once ABSPATH . WPINC . '/pluggable.php';
has fixed this issue for me! Thanks!

(I assume there wasn't any other major changes in the diff code.)


As for the forum quirks - I though it was odd that using the CODE tag caused the error about external urls where there were no url's.  That was just odd.



biologyben

  • I post occasionally
  • **
  • Posts: 56
  • Karma: 2
  • CiviCRM version: 4.5.3
  • CMS version: Wordpress 4.0
Re: Pluggable error on civi pages in posts
March 20, 2013, 09:47:16 pm
One thing fixed - one still broken.

Now on the Tell-a-friend and register links from the admin area, the address is using the wp path coming up as (url.com/wp/?page=CiviCRM&q=civicrm/event/...) and thus getting a 404 error --  as opposed to site url ( url.com/?page=CiviCRM&q=civicrm/event/.. .)  I just checked and the ones on the main page are correct - so this may be an admin-area only issue.


The good news is without the /wp everything would work properly - same as the shortcode - just need to get rid of the extraneous /wp

I don't know if the prior fix caused this or not as the link just showed the plug error or a 404.  Seems to just need to change to path used to create the url from the wp path to the site path.

PS - it would be a nice feature to be able to adjust the tell-a-friend path to be a pretty url -  a manual over-ride or to dynamically pull it from the current page url?
« Last Edit: March 21, 2013, 05:25:33 am by biologyben »

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Pluggable error on civi pages in posts

This forum was archived on 2017-11-26.