I'm having a major issue when I try to change the attributes (e.g. show publish date, show author) of an already published article. when I try to 'Save' or 'Save and Close' I find myself looking at a 404 page. I've deleted the entire install of Joomla and added it back afresh, but is still does this. This problem doesn't seem to be anything to do with anything other that the Joomla installation.
I've also set up a local version and this error doesn't occur. After turning on debugging I see that it's actually this query that's causing the issue.
Code: Select all
SELECT c.*,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as slug,COUNT(i.`id`) AS numitems
FROM jml_categories as c
LEFT JOIN jml_categories AS s
ON (s.lft <= c.lft
AND s.rgt >= c.rgt) OR (s.lft > c.lft
AND s.rgt < c.rgt)
LEFT JOIN (SELECT cat.id as id
FROM jml_categories AS cat JOIN jml_categories AS parent
ON cat.lft BETWEEN parent.lft
AND parent.rgt
WHERE parent.extension = 'com_content'
AND parent.published != 1
GROUP BY cat.id) AS badcats
ON badcats.id = c.id
LEFT JOIN `jml_content` AS i
ON i.`catid` = c.id
AND i.state = 1
WHERE (c.extension='com_content' OR c.extension='system')
AND c.published = 1
AND s.id=1
AND badcats.id is null
GROUP BY c.id, c.asset_id, c.access, c.alias, c.checked_out, c.checked_out_time, c.created_time, c.created_user_id, c.description, c.extension, c.hits, c.language, c.level, c.lft, c.metadata, c.metadesc, c.metakey, c.modified_time, c.note, c.params, c.parent_id, c.path, c.published, c.rgt, c.title, c.modified_user_id
ORDER BY c.lft
Code: Select all
#1064 you have an error in your sql syntax; check the manual that corresponds to your MySQl server version for the right syntax to use near WHEN CHAR_LENGTH(c.alias) then CONCAT_WS(':',c.id,c.alias) else c.id end as sl
1. Install Joomla
2. Create News Category (Title News, Alias news)
3. Add news item to Main Menu
4. Create article and relate it to News category
5. Check article to ensure publication
6. Edit settings to hide publication date and hide author.
7. Clicking 'Save' or 'Save and Close' results in 404 page (Category not found)
Can anyone perhaps shed some light on to why this is occurring and how it can be resolved. Is it something to do with how my server is setup? Any help would be greatly appreciated.
If it helps at all the site is hosted with asmallorange and is running MySQL server version 5.1.52-cll / client version 4.1.22 .