Deru Knowledgebase
Search:     Advanced search
Browse by category:
Contact Us

Mambo Admin "All contents Item" - join error

Add comment
Views: 2068
Votes: 1
Comments: 0
Posted: 01 Sep, 2009
by: Joseph S.
Updated: 16 Jul, 2012
by: Joseph S.
When you click on "All contents Item" in mambo admin it will show following error message:

Unknown column 'c.access' in 'on clause' SQL=SELECT c.*, g.name AS  groupname, cc.name, u.name AS editor, f.content_id AS frontpage,  s.title AS section_name, v.name AS author FROM mos_content AS c,  mos_categories AS cc, mos_sections AS s LEFT JOIN mos_groups AS g ON  g.id = c.access LEFT JOIN mos_users AS u ON u.id = c.checked_out LEFT  JOIN mos_users AS v ON v.id = c.created_by LEFT JOIN  mos_content_frontpage AS f ON f.content_id = c.id WHERE c.state >= 0  AND c.catid=cc.id AND cc.section=s.id AND s.scope='content' ORDER BY  s.title, c.catid, cc.ordering, cc.title, c.ordering LIMIT 0,10

Reason:

The mysql-5 uses different join rules in joining the database tables. Due to the mismatch in join rule the error occurred.

Fix:
You need to modify the join query mentioned in admin.content.php file.

The location of file will be administrator/components/com_content/admin.content.php.

Modify line 201 in admin.content.php from:
. "\n FROM , #__content AS c, #__categories AS cc, #__sections AS s"
to
. "\n FROM #__categories AS cc, #__sections AS s, #__content AS c "

Modify line  312 from :
 . "\n FROM , #__content AS c, #__categories AS cc, #__sections AS s"
to
 . "\n FROM #__categories AS cc, #__sections AS s, #__content AS c "

In these modification we are actually moving the "content AS c" to the end.

Reload the admin area of mambo and try to access the "All contents Item" . It will work fine :)
Others in this Category
document Running php4 and php5 together in server
document changing php values using .htaccess
document Track the "nobody mail senders" using PHP
document Using Curl to call a URL
document use Curl to POST data to a form.
document How to use curl to get the file contents
document Fixing libxml, php bug and issues with HTML entities by downgrading libxml
document Steps to install FFMPEG as an module in PHP
document How to install SSH2 for PHP Shell?
document Album access issue in Gallery
document How to install APC (Alternative PHP Cache)
document Upgrade from PHP4 to PHP5: Backward Incompatible Changes
document CAPCHA implementation in the Contact Page submission form



RSS