WPG2 deactivates G2 URL Rewrite plugin

videosc

Joined: 2008-01-24
Posts: 9
Posted: Thu, 2008-02-14 15:41

I activate the URL Rewrite plugin in G2, log off, log on to my WP blog and click on the Gallery 2 rewrites tab and see red for "Can G2 rewrite plugin be activated?" and below. I log off of WP, log back into G2 and the URL rewrite plugin is off again. I've repeated this several times with the same results. Everytime I go to the G2 rewrites tab in WPG2 this seems to deactivate the URL rewrite plugin back in G2. Very strange.

Another thread here said something about there being a turn on/off URL rewrite button in WPG2 admin but I can't find it. The same thread said something about changing permissions for a folder in order to see the on/off button but it didn't go into further detail about what to do. Is this the problem? Any other suggestions?

I'm using the latest versions (as of 2/14/08) of WPG2, G2 and WP.

Thanks!

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-02-14 21:44
videosc wrote:
I activate the URL Rewrite plugin in G2, log off, log on to my WP blog and click on the Gallery 2 rewrites tab and see red for "Can G2 rewrite plugin be activated?"

Red = Error, WPG2 cannot safely activate the G2 Rewrite Module thus why it keeps on being deactivated. What is the Red Error you are getting, as you will need to clear this error before you will be able to click on the activate button..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
videosc

Joined: 2008-01-24
Posts: 9
Posted: Fri, 2008-02-15 14:34

This is what shows up under the WPG2 Gallery 2 Rewrites tab:

Can Gallery2 Rewrite Plugin be Activated? No
Is Gallery2 Rewrite using Apache Mod_Rewrite? Skipped Due to Previous Failure
Wordpress .htaccess can be updated? Skipped Due to Previous Failure

All of the answers are in RED.

The error message I get is:

"WPG2 cannot remotely activate the Gallery2 Rewrite Plugin. Please manually configure the Gallery2 Rewrite Plugin from the Gallery2 Site Admin Plugin Panel."

So for me this is like some kind of cruel Catch-22 joke: I activate the Rewrite Plugin under G2 but WPG2 deactivates it, then tells me to activate it. Haha. Very funny. :)

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Sun, 2008-02-17 11:04

The text is poorly worded it should say install not activate, I will correct this in the next WPG2 release. I am not sure why the WPG2 cannot activate the plugin via the API it is a little odd.. Lets try an experiment, access your Gallery2 Site Admin via the WPG2 Page and activate the rewrite module, click on the test page and see if everything is ok. Also check to ensure the Gallery2 Rewrite plugin is using the apache rewrite module, do not use the PHP Path info it will not and WPG2 will stop it from being activated..

If the Rewrite module activates, and tests all ok, then go back to the WPG2 -> Gallery2 Rewrite tab and see if all the tests are green..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo

 
daveparker01

Joined: 2005-11-09
Posts: 1
Posted: Thu, 2008-03-06 00:02

I'm actually having difficulties that sound exactly like this: I've gotten g2 to say that rewrite functionality is working correctly, but wpg2 insists that there is a problem. All I see is "Can Gallery2 Rewrite Plugin be Activated? No". I've tried toggling rewrites from active to deactivated and back again in g2 - no difference.

I gather that it is *something* in here that's going wrong:


               // Test Activate G2 Rewrite Module.
                list ($ret, $g2_modulestatus ) = GalleryCoreApi::fetchPluginStatus('module');
                if (!$ret) {
                        if (isset($g2_modulestatus[$g2_moduleid]) && empty($g2_modulestatus[$g2_moduleid]['active']) && !$g2_modulestatus[$g2_moduleid]['active']) {
                                list ($ret, $ignored) = GalleryCoreApi::activatePlugin('module', 'rewrite');
                        }
                        list ($ret, $rewriteApi) = GalleryCoreApi::newFactoryInstance('RewriteApi');
                        if ($rewriteApi) { // Module Active
                                $environment_html .= '<font color="green">' . __('Yes', 'wpg2') . '</font>';
                        } else {
                                ####### I have verified that this is the branch that's being taken #############
                                $environment_html .= '<font color="red">' . __('No', 'wpg2') . '</font>';
                                $validate_err = 1;
                                define("G2REWRITEMODULEERR", "True");
                        }

But I haven't the slightest idea what it might be other than that it's in "list ($ret, $rewriteApi) = GalleryCoreApi::newFactoryInstance('RewriteApi')". Is this an issue that's been fixed in a patch or is does it continue to be a mystery?

 
ozgreg
ozgreg's picture

Joined: 2003-10-18
Posts: 1378
Posted: Thu, 2008-03-06 05:34

Firstly this is not a bug within WPG2, list ($ret, $ignored) = GalleryCoreApi::activatePlugin('module', 'rewrite'); is returning a failure which is the internal Gallery2 API Call used to activate the module.

In basic language G2 thinks it cannot activate the module so it fails, it could be a bug with G2 but considering G2 2.3 is about to be released, unless it is in G2.3, a bug fix for G2.2 is not going to happen..

If you are comfortable with PHP I can walk you though trapping the error output if you want..

____________________________________
Wordpress / Gallery2 (WPG2) Plugin, , WPG2 Documentation, WPG2 Demo