1054 - Unknown column 'a.c.ordering' in plugin call filelist

Phoca Download - download manager
worknmn
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 31 May 2013, 18:32
Location: Russia
Contact:

1054 - Unknown column 'a.c.ordering' in plugin call filelist

Post by worknmn »

I need to show filelist from some categry in K2 item text.

Code for calling:

Code: Select all

{phocadownload view=filelist|id=10}
But on item show error:

Code: Select all

1054 - Unknown column 'a.c.ordering' in 'order clause' SQL=SELECT a.id, a.title, a.alias, a.filename_play, a.filename_preview, a.link_external, a.image_filename, a.filename, c.id as catid, a.confirm_license, c.title as cattitle, c.alias as catalias, CASE WHEN CHAR_LENGTH(a.alias) THEN CONCAT_WS(':', a.id, a.alias) ELSE a.id END as slug, CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug FROM #__phocadownload AS a LEFT JOIN #__phocadownload_categories AS c ON a.catid = c.id WHERE c.id = 10 ORDER BY a.c.ordering ASC LIMIT 0, 5
In plugin /plugins/content/phocadownload/phocadownload.php in row 261:

Code: Select all

            $query .= ' ORDER BY a.'.$fileOrdering;
row to get $fileOrdering 246 :

Code: Select all

$fileOrdering 		= PhocaDownloadOrdering::getOrderingText($ordering);
This code get string 'c.ordering'

I made duty hack of row 261 for fix error :

Code: Select all

$query .= ' ORDER BY a.'.(explode('.',$fileOrdering)[count(explode('.',$fileOrdering))-1]);
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: 1054 - Unknown column 'a.c.ordering' in plugin call file

Post by Jan »

Hi, which version of Phoca Gallery component and which version of Phoca Gallery content plugin you run?

Jan
If you find Phoca extensions useful, please support the project
worknmn
Phoca Newbie
Phoca Newbie
Posts: 8
Joined: 31 May 2013, 18:32
Location: Russia
Contact:

Re: 1054 - Unknown column 'a.c.ordering' in plugin call file

Post by worknmn »

version of Phoca Download component 3.1.2
Plugin version
<name>plg_content_phocadownload</name>
<creationDate>07/11/2014</creationDate>
....
<version>3.0.6</version>
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48550
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: 1054 - Unknown column 'a.c.ordering' in plugin call file

Post by Jan »

Hi, you need the plugin version 3.1.x, just download it here:
https://www.phoca.cz/download/category/3 ... oad-plugin

Jan
If you find Phoca extensions useful, please support the project
Post Reply