After I install the freetag event plugin I get the following error message at the top of my list of plugins:
Parse error: parse error, expecting `'}'' in /home/timf/www/serendipity/plugins/serendipity_event_freetag/serendipity_plugin_freetag.php on line 84
I also get a plugin in my sidebar plugins area that looks like this:
Error!
Error: serendipity_plugin_freetag:386b1f74ff92890b0adf4575595f3121
I just upgraded to Serendipity version 0.9 and it still does the same thing.
The freetag plugin says it's version 2.30
Help?
freetag parse error on installation
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Damn, it was indeed a parse error in that plugin file. I just fixed it.
You need to go to line 84 and modify this to:
That means you cannot pass the $this->config calls in "{" and "}".
Best regards,
Garvin
You need to go to line 84 and modify this to:
Code: Select all
$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');
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Now I get an error when I try and display tagged items
When I configure the sidebar plugin and then click on a tag in the sidebar, I get this error:
Query failed:
SELECT
e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,
a.realname AS author,
a.email
, e.body, e.extended
FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid
JOIN serendipity_entrytags AS entrytags ON (e.id = entrytags.entryid) LEFT JOIN serendipity_authorgroups AS acl_a
ON acl_a.authorid = 1
LEFT JOIN serendipity_access AS acl_acc
ON ( acl_acc.artifact_mode = 'read'
AND acl_acc.artifact_type = 'category'
AND acl_acc.artifact_id = c.categoryid
)
WHERE isdraft = 'false' AND e.timestamp <= '1132759075' AND entrytags.tag = 'DRM' AND (
c.categoryid IS NULL
OR ( acl_acc.groupid = acl_a.groupid OR acl_acc.groupid = 0)
OR ( acl_acc.artifact_id IS NULL
)
)
GROUP BY e.id
ORDER BY timestamp DESC
LIMIT 10
/ You have an error in your SQL syntax near 'ON (e.id = entrytags.entryid) LEFT JOIN serendipity_authorgroups AS acl_a ' at line 28
Query failed:
SELECT
e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,
a.realname AS author,
a.email
, e.body, e.extended
FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid
JOIN serendipity_entrytags AS entrytags ON (e.id = entrytags.entryid) LEFT JOIN serendipity_authorgroups AS acl_a
ON acl_a.authorid = 1
LEFT JOIN serendipity_access AS acl_acc
ON ( acl_acc.artifact_mode = 'read'
AND acl_acc.artifact_type = 'category'
AND acl_acc.artifact_id = c.categoryid
)
WHERE isdraft = 'false' AND e.timestamp <= '1132759075' AND entrytags.tag = 'DRM' AND (
c.categoryid IS NULL
OR ( acl_acc.groupid = acl_a.groupid OR acl_acc.groupid = 0)
OR ( acl_acc.artifact_id IS NULL
)
)
GROUP BY e.id
ORDER BY timestamp DESC
LIMIT 10
/ You have an error in your SQL syntax near 'ON (e.id = entrytags.entryid) LEFT JOIN serendipity_authorgroups AS acl_a ' at line 28
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Now I get an error when I try and display tagged items
Ultravox, which Database type and version are you using?
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
DB Version
mysql Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: DB Version
Oh, that is a really old mysql version you have there. It seems to have troubles with joins.
Can you please use a tool like phpMyAdmin or the commandline mysql to execute this query:
And see if that generates an error as well?
Regards,
Garvin
Can you please use a tool like phpMyAdmin or the commandline mysql to execute this query:
Code: Select all
SELECT
e.id,
e.title,
e.timestamp,
e.comments,
e.exflag,
e.authorid,
e.trackbacks,
e.isdraft,
e.allow_comments,
e.last_modified,
a.realname AS author,
a.email
, e.body, e.extended
FROM
serendipity_entries AS e
LEFT JOIN serendipity_authors a
ON e.authorid = a.authorid
LEFT JOIN serendipity_entrycat ec
ON e.id = ec.entryid
LEFT JOIN serendipity_category c
ON ec.categoryid = c.categoryid
INNER JOIN serendipity_entrytags AS entrytags ON (e.id = entrytags.entryid) LEFT JOIN serendipity_authorgroups AS acl_a
ON acl_a.authorid = 1
LEFT JOIN serendipity_access AS acl_acc
ON ( acl_acc.artifact_mode = 'read'
AND acl_acc.artifact_type = 'category'
AND acl_acc.artifact_id = c.categoryid
)
WHERE isdraft = 'false' AND e.timestamp <= '1132759075' AND entrytags.tag = 'DRM' AND (
c.categoryid IS NULL
OR ( acl_acc.groupid = acl_a.groupid OR acl_acc.groupid = 0)
OR ( acl_acc.artifact_id IS NULL
)
)
GROUP BY e.id
ORDER BY timestamp DESC
LIMIT 10
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
That works
That worked. Maybe I need to look into upgrading mysql.
But not today.
What would need to change in the code for this to work? And would it be forwards compatible?
Thanks for your work on this!
But not today.
What would need to change in the code for this to work? And would it be forwards compatible?
Thanks for your work on this!
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: That works
I've just committed a new version of the plugin, by just replacing the "JOIN" (only the joins, not the LEFT (OUTER) JOINS!) with a "INNER JOIN". That is compatibly to mysql 3.23
But Updating to Mysql 4 is reocmmended, it's noticably faster.
Regards,
Garvin
But Updating to Mysql 4 is reocmmended, it's noticably faster.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Thank you!
I made your change to the JOIN and it's working well.
I suppose I ought to upgrade to MySQL 4 at some point. We'll see.
Thanks again!
I suppose I ought to upgrade to MySQL 4 at some point. We'll see.
Thanks again!
Visit my S9Y blog at:
http://timf.anansi-web.com/serendipity/
http://timf.anansi-web.com/serendipity/
