@awk@lisaviolet I don’t use MySql but if I have to guess you need to take the “DESC” off your “GROUP BY” clause and add a new line that says “ORDER BY e.tag_id DESC” instead.
Yup, implicit and explicit GROUP BY sorting was removed in MySQL 8.0.
I’d also change t.tag_id (after the SELECT) to e.tag_id so it is a valid GROUP BY (all non-aggregated columns should appear in the GROUP BY clause). This would give the same results for this particular query.
Also be sure to make a backup of the file (obvious but always worth mentioning) before editing it!
SELECT e.tag_id, COUNT(e.tag_id) AS count FROM exp_tag_tags t LEFT
JOIN exp_tag_entries e ON e.tag_id = t.tag_id GROUP BY e.tag_id ORDER
BY e.tag_id DESC
Right now, I’m backing up the entire directory and sql.
Parse error: syntax error, unexpected ‘e’ (T_STRING) in /home/lisa01/public_html/journal/jack/expressionengine/third_party/tag/mod.tag.php on line 5271
@awk@OnionSoup It worked! Yay! Thank you! You may have just saved me some money.
(I ran into a problem, downloading the directory for my weblog, the hard drive attached to my router decided it was no longer accepting new files; damn it - there is over 2 TB free disk space, so that’s not the problem. It’s happened before, but I don’t remember how I fixed it. I tested with a different external drive, no problem with that, so it’s the drive.)
@awk@lisaviolet the only problem with doing the select on the e.tag_id instead of the t.tag_id is that it won’t show if the “Count” is 0 (maybe that is the desired outcome anyway).
And, with that said, I don’t know if MySql will group on a field anyway if the value is NULL.
Ohhh good catch. If that was the desired behavior then we’d need to change the column in the GROUP BY, not the one in the SELECT. So:
SELECT t.tag_id, COUNT(e.tag_id) AS count
FROM exp_tag_tags t LEFT JOIN exp_tag_entries e ON e.tag_id = t.tag_id
GROUP BY t.tag_id
ORDER BY t.tag_id DESC
(also changing the ORDER BY to match)
In any case unless the MySQL server strictness settings were changed, SELECT and GROUP BY have to match up.
I just found out that the software for the blog can be automatically updated. I’m using v2.9.x (the last paid version), the current (free) version is v7.
I never updated (back in 2017) because it would have been a lot of work and modification.
But I doubt this plugin will work with the newer version.
Looks like I have something to keep me busy today. I can buy an updated version of the plugin, but I really don’t want to spend $99 that I could spend on crafting supplies. Or an Irk and have money left over.
What do you see? Error message? What software does it use and is it up to date?
@awk I’m using a third party plugin for an old version of expression engine.
I have a fair amount of plugins, but this (“tag” for tagging entries) is the only one throwing the error.
@awk @lisaviolet I don’t use MySql but if I have to guess you need to take the “DESC” off your “GROUP BY” clause and add a new line that says “ORDER BY e.tag_id DESC” instead.
@lisaviolet @OnionSoup
Yup, implicit and explicit GROUP BY sorting was removed in MySQL 8.0.
I’d also change t.tag_id (after the SELECT) to e.tag_id so it is a valid GROUP BY (all non-aggregated columns should appear in the GROUP BY clause). This would give the same results for this particular query.
Also be sure to make a backup of the file (obvious but always worth mentioning) before editing it!
@awk @OnionSoup
So, like this?
Right now, I’m backing up the entire directory and sql.
@lisaviolet @OnionSoup Yes that looks right. Hopefully that’s the only thing that needs fixing!
@awk @OnionSoup starting up cuteftp again…
Fingers crossed.
Eh…
Parse error: syntax error, unexpected ‘e’ (T_STRING) in /home/lisa01/public_html/journal/jack/expressionengine/third_party/tag/mod.tag.php on line 5271
@lisaviolet @OnionSoup
PHP error, something should be inside quotes when it isn’t… are all the quotes balanced and so forth?
Also that line (5271) is before the SQL line (5275) which is a bit unexpected. Maybe a stray character got in the file.
@awk @OnionSoup It worked! Yay! Thank you! You may have just saved me some money.
(I ran into a problem, downloading the directory for my weblog, the hard drive attached to my router decided it was no longer accepting new files; damn it - there is over 2 TB free disk space, so that’s not the problem. It’s happened before, but I don’t remember how I fixed it. I tested with a different external drive, no problem with that, so it’s the drive.)
@awk @lisaviolet the only problem with doing the select on the e.tag_id instead of the t.tag_id is that it won’t show if the “Count” is 0 (maybe that is the desired outcome anyway).
And, with that said, I don’t know if MySql will group on a field anyway if the value is NULL.
@lisaviolet @OnionSoup
Ohhh good catch. If that was the desired behavior then we’d need to change the column in the GROUP BY, not the one in the SELECT. So:
(also changing the ORDER BY to match)
In any case unless the MySQL server strictness settings were changed, SELECT and GROUP BY have to match up.
@awk @OnionSoup Yes, no need to show a zero count.
As long as it isn’t throwing an error message, I’m okay.
Thanks for your help!
only if it’s European sql. from what I understand, African sql is non-migratory.
I just found out that the software for the blog can be automatically updated. I’m using v2.9.x (the last paid version), the current (free) version is v7.
I never updated (back in 2017) because it would have been a lot of work and modification.
But I doubt this plugin will work with the newer version.
Looks like I have something to keep me busy today. I can buy an updated version of the plugin, but I really don’t want to spend $99 that I could spend on crafting supplies. Or an Irk and have money left over.
@lisaviolet Lucky for you, there’s a comment right below that will teach you how to make $99,000/month!
@awk That’s exactly what I need!