Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • Aleksander Rangelov Friend
    #189233

    Hi, I went through several host plans because of this huge request to the server. Where does this come from?
    Thank you!

    SELECT a.fulltext, a.id, a.title, a.alias, a.introtext, a.state, a.images, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,a.publish_up, a.publish_down, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.featured, a.ordering, c.alias AS category_alias, LENGTH(a.fulltext) AS readmore,a.fulltext, a.id, a.title, a.alias, a.introtext, a.state, a.images, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by,a.publish_up, a.publish_down, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.featured, a.ordering, c.alias AS category_alias, LENGTH(a.fulltext) AS readmore,c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias,CASE WHEN a.created_by_alias > ‘ ‘ THEN a.created_by_alias ELSE ua.name END AS author,ua.email AS author_email,contact.idas contactid,parent.title as parent_title, parent.id as parent_id, parent.path as parent_route, parent.alias as parent_alias,ROUND(v.rating_sum / v.rating_count, 0) AS rating, v.rating_count as rating_count,c.published, CASE WHEN badcats.id is null THEN c.published ELSE 0 END AS parents_published
    FROM rvhtd_content AS a
    LEFT JOIN rvhtd_content_frontpage AS fp ON fp.content_id = a.id
    LEFT JOIN rvhtd_categories AS c ON c.id = a.catid
    LEFT JOIN rvhtd_users AS ua ON ua.id = a.created_by
    LEFT JOIN rvhtd_users AS uam ON uam.id = a.modified_by
    LEFT JOIN (
    SELECT contact.user_id, MAX(contact.id) AS id, contact.language
    FROM rvhtd_contact_details AS contact
    WHERE contact.published = 1
    GROUP BY contact.user_id, contact.language) AS contact ON contact.user_id = a.created_by
    LEFT JOIN rvhtd_categories as parent ON parent.id = c.parent_id
    LEFT JOIN rvhtd_content_rating AS v ON a.id = v.content_id
    LEFT OUTER JOIN (SELECT cat.id as id FROM rvhtd_categories AS cat JOIN rvhtd_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
    WHERE a.access IN (1,1) AND c.access IN (1,1) AND CASE WHEN badcats.id is null THEN a.state ELSE 0 END = 1 AND a.catid IN (91) AND (a.publish_up = ‘0000-00-00 00:00:00’ OR a.publish_up <= ‘2013-07-20 07:13:50’) AND (a.publish_down = ‘0000-00-00 00:00:00’ OR a.publish_down >= ‘2013-07-20 07:13:50’)
    GROUP BY a.id, a.title, a.alias, a.title_alias, a.introtext, a.checked_out, a.checked_out_time, a.catid, a.created, a.created_by, a.created_by_alias, a.created, a.modified, a.modified_by, uam.name, a.publish_up, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.xreference, a.featured, a.fulltext, a.state, a.publish_down, badcats.id, c.title, c.path, c.access, c.alias, uam.id, ua.name, ua.email, contact.id, parent.title, parent.id, parent.path, parent.alias, v.rating_sum, v.rating_count, c.published, c.lft, a.ordering, parent.lft, fp.ordering, c.id, a.images, a.urls
    ORDER BY a.created DESC LIMIT 0, 5;

    phong nam Friend
    #500192

    Hi anrangelov,

    The database queries show that you are using the Select Categories option under the Advanced Options tab of menu item. The error will appear when you select both “All categories” and child category in Select Categories option. So that I suggest you should select All categories only, it will help to solve your issue.

    Aleksander Rangelov Friend
    #500243

    Thank you for the fast response but this probably is a solution for Joomla 3, I use Joomla 2.5.11

    phong nam Friend
    #500244

    Hi anrangelov,

    Did you solve your issue ? Both J2.5.11 and 3.x will reproduce the same syntax error with the wrong configuration of Featured Articles menu item as I mentioned.

    Aleksander Rangelov Friend
    #500250

    My menu “HOME” is with a selected Featured Article:). Is that a reason for this query?

    phong nam Friend
    #500294

    Hi anrangelov,

    No. The reason is that you select both All categories & child categorys in Select Categories option. This will reproduce the same query syntax error on both J3.x, J2.5.x.


    1. 7-27-2013-9-35-29-AM
Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 2 voices, and was last updated by  phong nam 11 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum