WPG2 broken with custom WP_CONTENT_DIR
starscapes
Joined: 2009-01-16
Posts: 4 |
Posted: Fri, 2009-01-16 23:33 |
Hi all: I've been struggling on and off for a few days, but I'm far from familar with php, or WPG2 code. I'm hoping someone can shed some light on this. I'm running Wordpress 2.7 with configured with a custom WP_CONTENT_DIR. WPG2 3.0.7 is installed and activated. The admin Dashboard shows the WPG2 submenu with a whole bunch of items. However all the links are wrong. The paths used in the links are of the base install of wordpress, not from the custom WP_CONTENT_DIR. For example, the WPG2 Path submenu link is (the links are invalid, not pointing to my domain). But it really should read: https://blog.example.org/~testuser/wp-content/plugins/wpg2/wpg2functions.inc?page=wpg2_pathadmin And the main WPG2 link (I think it should point to validate...) points to: I think it's suppose to read: Things I've tried: I tried a couple of changes, modifying wpg2base to use WP_PLUGIN_DIR instead of "ABSPATH.$wpg2base". I've also modified wpg2functions.inc:wpg2_addwpmenus() to replace __FILE__ with WP_PLUGIN_DIR . DIRECTORY_SEPARATOR . 'wpg2' . basename(__FILE__). The WPG2 submenu items seem to be correct. The WPG2 Path submenu link becomes https://blog.example.org/~testuser/wp-admin/admin.php?page=wpg2_pathadmin. It pulls up the page for setting the paths. But the validate link is: https://blog.example.org/~testuser/wp-admin/admin.php?page=wpg2/wpg2functions.inc. I get a blank page. There are a couple of places that use ABSPATH that I didn't change, since it didn't look like it's used to refer to a the plugin dir. Mostly, in wpg2embed.inc, where it's modifying relative paths (I think it's expanding them). If anyone has any experience running Wordpress 2.7 and WPG2 with a custom WP_CONTENT_DIR/WP_PLUGIN_DIR, or any WPG2 developers out there, I'd appreciate some direction! Thanks, Nancy |
|
Posts: 1378
Hiya Nancy,
I am not familiar with that new path value and it is clear WPG2 cannot support this in it's current codebase form. I also think the WPG2 page will be broken and the permalinks will also be invalid.
Can you please help me understand the reasoning behind the setting of a whole new file path?
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 4
Hi ozgreg,
That's too bad. I thought WPG2 was compatible with Wordpress 2.6
WP_CONTENT_DIR, WP_CONTENT_URL, WP_PLUGIN_DIR, WP_PLUGIN_URL were added in Wordpress 2.6.
For reference see:
http://codex.wordpress.org/Version_2.6
http://codex.wordpress.org/Determining_Plugin_and_Content_Directories
Basically it gives more flexibility when installing Wordpress, allowing the config directory to be moved out of web-accessible directories.
I'm running wordpress with "Virtual Multiblog" (http://striderweb.com/wp-content/multiblog/multiblog-readme.htm). It allows multiple blogs from a single wordpress installation. Yes, I'm aware of WordpressMU, but it was just too complicated for what I needed. I wanted to separate out the config directories for each user (it also allows me to separate out the uploads directory so that there's one per user).
Hope this answers your question. Perhaps WPG2 will support it in a future release? I have some of the code changed to use these new constants, but I'm far from familiar with the WPG2 code and PHP.
Thanks!
Nancy
Posts: 1378
WPG2 does support WP 2.6 (and WP2 2.7) however I have no experience with Virtual Multiblog and unsure if WPG2 will work with this plugin. I was not aware of the additional path changes in 2.6 and I can see a whole host of issues when actually implementing those kind of changes as a number of WP plugins MUST be run out of web-accessible directories. Technically I think WPG2 should work outside a web accessible directory (with modifications) however I still question the logic behind this change as having a plugin in a non web accessible may give the feeling of improving security but it does not make the plugin actually secure.
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 4
Virtual blog is the reason I'm using the WP_CONTENT_DIR, but I suspect it would be compatible with WPG2 if the default WP_CONTENT_DIR were used. in this case it's not so much a matter of security.
Thanks for answering my question!
Nancy
Posts: 1378
No problems, sorry it did not work out, I will be testing those variables in the next release as long as nothing too major breaks I should be able to support them at least..
____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo
Posts: 4
Looking forward to it!