Ina Code Blog

bunch of code in one place
May
21

Joomla: DB function failed with error number 1054

Posted by admin in joomla, tips

A joomla website was transfered from old server using MySql 4.1.x to new server using MySql 5.

When I tried to edit the website content in joomla administration I got next error:

DB function failed with error number 1054
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 jos_content AS c, jos_categories AS cc, jos_sections AS s LEFT JOIN jos_groups AS g ON g.id = c.access LEFT JOIN jos_users AS u ON u.id = c.checked_out LEFT JOIN jos_users AS v ON v.id = c.created_by LEFT JOIN jos_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

The problem can be solved by editing this file: /administrator/components/com_content/admin.content.php

Find:

$query = “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”
. “\n FROM #__content AS c, #__categories AS cc, #__sections AS s”
. “\n LEFT JOIN #__groups AS g ON g.id = c.access”
. “\n LEFT JOIN #__users AS u ON u.id = c.checked_out”
. “\n LEFT JOIN #__users AS v ON v.id = c.created_by”
. “\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id”
. ( count( $where ) ? “\nWHERE ” . implode( ‘ AND ‘, $where ) : ” )
. $order
. “\n LIMIT $pageNav->limitstart,$pageNav->limit”
;

And replace it with:

$query = “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”
. “\n FROM #__content AS c” //, #__categories AS cc, #__sections AS s”
. “\n LEFT JOIN #__groups AS g ON g.id = c.access”
. “\n LEFT JOIN #__users AS u ON u.id = c.checked_out”
. “\n LEFT JOIN #__users AS v ON v.id = c.created_by”
. “\n LEFT JOIN #__content_frontpage AS f ON f.content_id = c.id”
. “\n LEFT OUTER JOIN #__categories AS cc ON c.catid=cc.id”
. “\n LEFT OUTER JOIN #__sections AS s ON cc.section=s.id”
. ( count( $where ) ? “\nWHERE ” . implode( ‘ AND ‘, $where ) : ” )
. $order
. “\n LIMIT $pageNav->limitstart,$pageNav->limit”
;

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jan
23

Joomla! 1.5 Stable is out

Posted by admin in joomla

Joomla! community announced to the world that Joomla! 1.5 Stable is now awailable.

Take a look at Joomla! 1.5 Overview.

Download Joomla1.5.0.

Need some help with installing Joomla? Here is Joomla Installation Manual.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Nov
28

JCE editor for Joomla

Posted by admin in joomla

When building websites with Joomla I had many problems with content editors. One supports inseting files, but not creating thumbnails or you can’t even upload images or you have to create links manually etc. Bunch of problems with rather unimportant thing regarding building websites.

However, there is an editor that meets all my needs. It’s JCE editor. You can download full pack below: it includes component, mambot and bunch of plugins which helps you manipulate your content in many ways. It also includes Slovenian language pack.

Download JCE editor.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]