forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 plugins => Topic started by: nicopilami on December 14, 2013, 03:22:40 pm

Title: smart catlist
Post by: nicopilami on December 14, 2013, 03:22:40 pm
Hi
I installed the plugin "smart catlist", but then... BOUM !!!

Code: [Select]
While executing query 'SELECT title, r.description, keyword, category, aid, alb_hits, visibility, r.thumb, r.owner
        FROM cpg_categories AS c
        INNER JOIN cpg_albums AS r ON r.category = c.cid
        WHERE c.depth BETWEEN 0 + 1 AND 0 + 2
ORDER BY r.pos, r.aid' in index.php on line 381

mySQL error: Column 'visibility' in field list is ambiguous

I guess it is a "c." that has to be added, but where and in wich file ?

Thanks
Nico
Title: Re: smart catlist
Post by: gmc on December 17, 2013, 04:24:37 am
`visibility` is a native column in `cpg_albums`... Appears smart catlist adds a `visibility` column to `cpg_categories` creating the ambiguous issue in this query... You can either qualify visibility in the SQL as r.visibility to continue to refer to the column in `cpg_albums` (the error message gives you both the file and line number to change)... or change the column name used by smart catlist to something else (in several places within the plugin code I'm sure...)
I don't know what other queries in CPG will have an issue with the ambiguous fields created by smart catlist...

I no longer have a 1.4 environment, but the SQL in 1.5.24 appears similar for this query.
I don't think I've seen this plugin in a 1.5 version.