Search code examples
joomla

Joomla! 3.6.5 Unknown column 'c.version' in 'field list'


I was given the a copy of the folder "httpdocs" and a .sql of the Joomla database from a fully operational site on plesk, and was asked to mount the website locally.

The version of Joomla is 3.6.5, I checked it on the en-GB.xml. The PHP version on the original server was 5.4.45, and now I am using Xampp 1.8.2 with PHP 5.4.31.

After changing the configuration.php to connect to the database, and then accessing the site I get this error:

1054 - Unknown column 'c.version' in 'field list'

SQL=

SELECT 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, c.version,
       CASE
           WHEN CHAR_LENGTH(c.alias) != 0 THEN CONCAT_WS(':', c.id, c.alias)
           ELSE c.id
       END as slug,
       COUNT(i.`id`) AS numitems
FROM #__categories as c
LEFT JOIN (
    SELECT cat.id as id
    FROM #__categories AS cat
    JOIN #__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 #__categories AS s ON 
    (s.lft < c.lft AND s.rgt > c.rgt AND c.language in ('en-GB','*'))
     OR (s.lft >= c.lft AND s.rgt <= c.rgt)
LEFT JOIN `#__content` AS i ON
     i.`catid` = c.id AND i.state = 1 AND (i.language = '*' OR i.language = 'en-GB')
WHERE (c.extension='com_content' OR c.extension='system')
    AND c.access IN (1,1)
    AND c.published = 1
    AND badcats.id is null
    AND s.id=10
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, c.version
ORDER BY c.lft

From what I have seen, this error is common in websites that are being updated from Joomla! 2.5 to 3.x, this one is not.

I am not very familiar with Joomla!, but I will update this question with any requested information.


Solution

  • Aparently I was given a database for Joomla! 2.5 instead of the current version, now it works fine