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) »
  • Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
Pages: [1]

Author Topic: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken  (Read 1456 times)

Erik Stainsby

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • Web+Db Programmer
  • CiviCRM version: 4.4.3 WP plugin
  • CMS version: WP 3.7.1
  • MySQL version: 5.5.34
  • PHP version: 5.3.10-1ubuntu3.8
Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 12:53:25 pm
When trying to use the shortcode generator button in a WP page editor to create the civicrm shortcodes, I see the initial overlay, the picklilst of modules but the form exhibits no behaviour.  It does not update to show any selectable CiviCRM components.  The insert code does nothing.  The cancel button closes the overlay.
This is a problem, obviously.

Erik Stainsby

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • Web+Db Programmer
  • CiviCRM version: 4.4.3 WP plugin
  • CMS version: WP 3.7.1
  • MySQL version: 5.5.34
  • PHP version: 5.3.10-1ubuntu3.8
Re: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 01:16:39 pm
Screen shot for clarity.

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: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 01:53:11 pm

seems like a js issue. enable firebug and see if you can figure out the error. might also want to switch to the standard WP theme and see if it works there

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

Erik Stainsby

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • Web+Db Programmer
  • CiviCRM version: 4.4.3 WP plugin
  • CMS version: WP 3.7.1
  • MySQL version: 5.5.34
  • PHP version: 5.3.10-1ubuntu3.8
Re: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 02:07:39 pm
Firebug yields no complaints.  This is an admin-context thing, so the theme swapping seems dubious. I have done so in any case, with no improvement.  Proceeding now to disabling all plugins and hunting for a conflict.

Erik Stainsby

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • Web+Db Programmer
  • CiviCRM version: 4.4.3 WP plugin
  • CMS version: WP 3.7.1
  • MySQL version: 5.5.34
  • PHP version: 5.3.10-1ubuntu3.8
Re: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 02:17:16 pm
Eliminated all plugins save CiviCRM - still fails to exhibit any behaviour.

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: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 02:42:30 pm

it works for me on a simple vanilla WP 3.7.1 + Civi 4.4.3

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

Erik Stainsby

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • Web+Db Programmer
  • CiviCRM version: 4.4.3 WP plugin
  • CMS version: WP 3.7.1
  • MySQL version: 5.5.34
  • PHP version: 5.3.10-1ubuntu3.8
Re: Civ 4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 04:36:28 pm
Just built a completely fresh  3.7.1 + 4.4..3 and it does NOT work. I don't know what you have done differently Don, but my simple clean installation is still broken.

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: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 07, 2013, 05:06:33 pm

sorry dont know :(

to double check, i just did a clean reinstall of civicrm from the download site (on an exisiting wp 3.7.1) and it worked fine

i did restart my webserver since there was something wierd going on (some php opcode caching)

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

Erik Stainsby

  • I’m new here
  • *
  • Posts: 28
  • Karma: 1
  • Web+Db Programmer
  • CiviCRM version: 4.4.3 WP plugin
  • CMS version: WP 3.7.1
  • MySQL version: 5.5.34
  • PHP version: 5.3.10-1ubuntu3.8
Re: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 08, 2013, 07:12:22 am
Debianized ubuntu does not use the same location to installl WP as the documented path in Civi installation directions.  Ubuntu installs WP at /usr/share/wordpress, whereas the Civi docs indicate /var/lib/wordpress.

In the civicrm.php [line 1191]  the current file location is used to derive the path to the civicrm.js file for loading.
$src = plugins_url(
      'civicrm.js',
      __FILE__
    );


This line concatenates the plugins_uri() with the path derived.  I believe this would be better expressed (ie, more variable and tolerant)  as
$src = plugins_url(
      'civicrm.js',
      dirname(__FILE__)
    );



From the Wordpress Codex:

Quote
If you are using the plugins_url() function in a file that is nested inside a subdirectory of your plugin directory, you should use PHP's dirname() function:

<?php
echo '<img src="' . plugins_url( 'images/wordpress.png' , dirname(__FILE__) ) . '" > ';
?>

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: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
December 08, 2013, 07:16:08 am

great. thanx for investigating and resolving. Can you please file an issue with a link to this forum post

thanx

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

pcoutas

  • I’m new here
  • *
  • Posts: 27
  • Karma: 0
  • CiviCRM version: 4.4.5
  • CMS version: WordPress 3.9.1
  • MySQL version: 5.5.32
Re: Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken
February 26, 2014, 02:32:59 am
I'm having the same problem, and don't really understand how to fix it! I'm not a coder :)

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Installing CiviCRM »
  • WordPress Installations (Moderators: Kurund Jalmi, Coleman Watts) »
  • Civ 4.4.2/4.4.3 + WP 3.7.1 shortcode builder broken

This forum was archived on 2017-11-26.