1 (edited by ConnyT 2005-01-20 09:05)

Topic: Error with plugins

After "installing" the news plugin i get the error

"There is no plugin called 'AP_News_Generator.php?plugin=AP_News_Generator.php' in the plugin directory."

I placed the AP_News_Generator.php-sctipt in the /plugins directory together with the folder /plugins/AP_News_Generator and the contents of it.

I tried to run the Example-plugin and got the same error.

I got it working by inserting

if (strpos($plugin,'=')) 
    list(,$plugin) = split('=', $plugin);

on line 41 in admin_loader.php.

This cured the symptom, not the cause, so I imagine that there is a correct way to sort this out.

Re: Error with plugins

Hmm, odd. I'll look into it.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Error with plugins

Just for fun, could you try running dump($_GET); directly after the inclusion of common_admin.php and paste what it spits out?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: Error with plugins

dump($_GET); spits out:

Array
(
    [plugin] => AMP_Example.php?plugin=AMP_Example.php
    [foo] => bar
)

5 (edited by ConnyT 2005-01-20 23:02)

Re: Error with plugins

If I replace the original action statement in the plugin itself (action="<?php echo $_SERVER['REQUEST_URI'] ?>&foo=bar")
with action="?<?php echo $_SERVER['QUERY_STRING'] ?>&foo=bar" it works ok.

Could it have something to do with how the server I run parses the script?
I mean since no one else has mentioned this..