Bug 921402 - Broken plugins in WordPress
Summary: Broken plugins in WordPress
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Templates
Version: 1.x
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-14 06:55 UTC by Antonius Aji
Modified: 2014-03-12 20:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-03-12 20:17:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
install (21.81 KB, image/png)
2013-03-14 08:42 UTC, Wei Sun
no flags Details
activate (83.06 KB, image/png)
2013-03-14 08:42 UTC, Wei Sun
no flags Details

Description Antonius Aji 2013-03-14 06:55:25 UTC
Description of problem:
Some plugins for WordPress in RH Cloud is broken.

Version-Release number of selected component (if applicable):


How reproducible:
It is reproducible

Steps to Reproduce:
1. Install WordPress as in RH Cloud.
2. Install plugins such as PicasaView
3. Activate PicasaView plugin
  
Actual results:

Javascript is not properly loaded-up, hence the lightbox script does not work properly. Javascript debug console shows that the javascript.js is not correctly called i.e. at 

https://appname-space.rhcloud.com/wp-content/plugins/var/lib/openshift/513daeba4382ecd17f000045/app-root/data/plugins/picasaview/picasaview.js

Expected results:

The proper call should be:

https://appname-space.rhcloud.com/wp-content/plugins/picasaview/picasaview.js


Additional info:

The problem can be as follow:
a. Red Hat already have the folder "plugins" in ~/app-root/runtime/repo/php/wp-content as symlink to  /var/lib/openshift/513daeba4382ecd17f000045/app-root/data//plugins

b. Hence, the PicasaView plugin is installed in /var/lib/openshift/513daeba4382ecd17f000045/app-root/data//plugins

c. The problem is that the php code inside picasaview.php with many standard "__FILE__" which translates to the file name with absolute address i.e. /var/lib/openshift/513daeba4382ecd17f000045/app-root/data//plugins/picasaview/picasaview.php, and the coding create 

https://appname-space.rhcloud.com/wp-content/plugins/var/lib/openshift/513daeba4382ecd17f000045/app-root/data/plugins/picasaview/picasaview.js  -- which is broken

instead of 

https://appname-space.rhcloud.com/wp-content/plugins/picasaview/picasaview.js


d. The solution is to delete the "plugins" folder set by RH Cloud, which is symlinked to /var/lib/openshift/513daeba4382ecd17f000045/app-root/data//plugins, and create "plugins" folder without symlink. The risk will be the "plugins" folder can be erased during GIT push.

Comment 1 Wei Sun 2013-03-14 08:42:09 UTC
Created attachment 709915 [details]
install

Test this bug on Production and devenv_2933,can not reproduce it.I can install PicasaView and activate PicasaView plugin successfully.

Comment 2 Wei Sun 2013-03-14 08:42:38 UTC
Created attachment 709916 [details]
activate

Comment 3 Antonius Aji 2013-03-17 00:11:55 UTC
Wei Sun,

It is true that you can install and active PicasaView, but the plugin does not work such as its lightbox feature. And the reason for that is due to the web browser cannot download the .js script (of PicasaView) properly. I only realized that when I open the console in the browser (I use Chrome, to open the console is CTRL-SHIFT-J)

Steps to reproduce:
a. Install PicasaView plugin.
b. Activate PicasaView plugin.
c. Go to Setting -- PicasaView, and use my Picasa ID: 117520727894266469000 as User ID
d. Create a new page and put the following short-code: [picasaview album='IATFHBH2012' instantview='yes']
e. Open the Chrome browser with console active (CTRL-SHIFT-J)
f. Open the page we just created in (d), and we will see "Get Error" in the console (the first row).

I can share you the screenshot, but I don't know how.

rdgs,
aa

Comment 4 Clayton Coleman 2013-03-26 14:27:43 UTC
I think this is the HTTPS / HTTP issue with wordpress.  We may be able to address this by setting the config value for the base URL in wordpress config at start time (wouldn't work with aliases).

Comment 5 Clayton Coleman 2013-03-27 20:06:21 UTC
User can address via config (workaround) by setting the base Wordpress URL.

Comment 6 Dan McPherson 2014-03-12 20:17:21 UTC
Closing based on the workaround.  We have also updated wordpress recently.  Not sure if that helped.


Note You need to log in before you can comment on or make changes to this bug.