Page 1 of 1

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

Posted: 09 Jun 2016, 16:29
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]);

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

Posted: 10 Jun 2016, 12:50
by Jan
Hi, which version of Phoca Gallery component and which version of Phoca Gallery content plugin you run?

Jan

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

Posted: 22 Jun 2016, 23:04
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>

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

Posted: 23 Jun 2016, 18:36
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