Page 1 of 1

serendipity_plugin_freetag

Posted: Fri Nov 25, 2005 12:13 pm
by CaptainCrunch
Since my upgrade to 0.9.1 my tags didn't show up anymore in the sidebar, so I simply deleted the (sidebar-) Plugin. When I try to reinstall, this is what I keep getting:
Fehler: serendipity_plugin_freetag:7808c4ce9820230213dbe8edf2dc96ec ()
DEBUG: Plugin serendipity_plugin_freetag:7808c4ce9820230213dbe8edf2dc96ec not an object: .
Input: Array ( [adminModule] => plugins [pluginPath] => [install_plugin] => serendipity_plugin_freetag [action] => [adminAction] => ) .

Please report this bug. This error can happen if a plugin was not properly downloaded (check your plugins directory if the requested plugin was downloaded) or the inclusion of a file failed (permissions?)
Backtrace:
Installing plugin: Array ( [0] => serendipity_plugin_freetag [1] => [2] => right [3] => 0 [4] => )
INSERT INTO serendipity_plugins (name, sort_order, placement, authorid, path) values ('serendipity_plugin_freetag:7808c4ce9820230213dbe8edf2dc96ec', 11, 'right', '0', '')
No valid path/filename found. Aborting.
Classname serendipity_plugin_freetag still does not exist. Aborting.
Loading plugin failed painfully. File not found?
No valid path/filename found. Aborting.
Classname serendipity_plugin_freetag still does not exist. Aborting.
The file serendipity_plugin_freetag.php is located within serendipity_event_freetag and also has the correct permissions. I reported that one as the error told me, so what's next? ;)

Re: serendipity_plugin_freetag

Posted: Fri Nov 25, 2005 12:22 pm
by garvinhicking
You should try to see if the file permissions of that freetag plugin are right, and check if it'S the latest version?

Some version of the plugin recently had a parse error...

Best regards,
Garvin

Posted: Fri Nov 25, 2005 12:34 pm
by CaptainCrunch
Permissions:
-rw-rw-r-- 1 www-data www-data 4056 Nov 24 11:33 serendipity_plugin_freetag.php
Version is:
$propbag->add('version', '2.17');

Posted: Fri Nov 25, 2005 12:43 pm
by garvinhicking
Hm, the plugin file is within the plugins/serendipity_event_freetag/ directory?

You might want to try to empty (not delete) your serendipity_pluginlist table? You can also achieve that by entering spartacus config and just hitting "save".

Is the plugin listed as installed in the serendipity_plugins DB table?

Regards,
Garvin

Posted: Fri Nov 25, 2005 12:51 pm
by CaptainCrunch
Hm, the plugin file is within the plugins/serendipity_event_freetag/ directory?
That's what I mean above. Sorry if that wasn't clear. :oops:
You might want to try to empty (not delete) your serendipity_pluginlist table? You can also achieve that by entering spartacus config and just hitting "save".
OK, deleted everything from that table by hand, now I'm (at least) able to install the plugin. Thanks for that one, but my tags won't show up?!?

Posted: Fri Nov 25, 2005 12:57 pm
by garvinhicking
Ah, let me guess. You're using postgreSQL, hm?

Someone recently changed a GROUP BY ... HAVING clause in the sidebar plugin. I bet it doesn't perform with postgreSQL...

Regards,
Garvin

Posted: Fri Nov 25, 2005 1:01 pm
by CaptainCrunch
Thanks for the hint. I'll investigate and report. ;)

Posted: Fri Nov 25, 2005 1:10 pm
by garvinhicking
This would be awesome!

BTW, this would be the patch that broke the plugin for you:

http://cvs.sourceforge.net/viewcvs.py/p ... 13&r2=1.14

Best regards,
Garvin

Posted: Fri Nov 25, 2005 1:25 pm
by zoran
garvinhicking wrote:Someone recently changed a GROUP BY ... HAVING clause in the sidebar plugin. I bet it doesn't perform with postgreSQL...
I think I know that someone :oops:

Posted: Fri Nov 25, 2005 1:28 pm
by CaptainCrunch
Ah, nice to see this diff in colour too instead of the command line (which was what I did a few minutes ago). ;)

The query causing this problem ist that one:
$query = "SELECT tag, count(tag) as total FROM {$serendipity['dbPrefix']}entrytags GROUP BY tag HAVING total >= {$this->get_config('treshold_tag_count')} ORDER BY tag LIMIT {$this->get_config('max_tags')}";
Postgres doesn't like the handling of the "HAVING"-clause as it's done here (see http://www.xach.com/aolserver/mail/names-in-having.txt ).

Diff here:

Code: Select all

--- serendipity_plugin_freetag.php.old  2005-11-25 13:22:10.000000000 +0100
+++ serendipity_plugin_freetag.php      2005-11-25 13:21:25.000000000 +0100
@@ -81,7 +81,7 @@

         $title = $this->get_config('title', $this->title);

-        $query = "SELECT tag, count(tag) as total FROM {$serendipity['dbPrefix']}entrytags GROUP BY tag HAVING total >= " . $this->get_config('treshold_tag_count') . " ORDER BY tag LIMIT " . $this->get_config('max_tags');
+        $query = "SELECT tag, count(tag) as total FROM {$serendipity['dbPrefix']}entrytags GROUP BY tag HAVING count(tag) >= " . $this->get_config('treshold_tag_count') . " ORDER BY tag LIMIT " . $this->get_config('max_tags');

         $rows = serendipity_db_query($query);
ATTENTION: I don't know if this also works in MySQL, but as it's SQL-conform it should do. ;)

Posted: Fri Nov 25, 2005 1:33 pm
by garvinhicking
Cool, that patch looks good. Just committed! :)

Regards,
Garvin

Posted: Fri Nov 25, 2005 1:34 pm
by CaptainCrunch
It's always a pleasure being able to help you out. ;)