cotonti.com : Pagesiblings gives an sql error https://www.cotonti.com Son konu mesajları Cotonti en Mon, 01 Dec 2025 07:37:05 -0000 foxhound Thanks very much Twiebie, that works perfectly! :)

]]>
Paz, 26 Oca 2014 16:43:18 -0000
Twiebie Replace line 10 and 11 in pagesiblings.php with:

$sort = 'page_'.$cfg['page']['cat_'.$pag['page_cat']]['order'];
$way = $cfg['page']['cat_'.$pag['page_cat']]['way'];

 

]]>
Paz, 26 Oca 2014 15:50:44 -0000
foxhound I am trying to use pagesiblings on my new website but as soon as I install it and want to view a page I keep getting this error:

 

2014-01-26 15:22
SQL error 42S22: Column not found: 1054 Unknown column 'page_' in 'order clause'
#0  cot_diefatal(SQL error 42S22: Column not found: 1054 Unknown column 'page_' in 'order clause') called at [D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\system\database.php:576]
#1  CotDB->query(SELECT * FROM cot_pages WHERE page_cat = ? ORDER BY page_ , Array ([0] => news)) called at [D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\plugins\pagesiblings\pagesiblings.php:14]
#2  include(D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\plugins\pagesiblings\pagesiblings.php) called at [D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\modules\page\inc\page.main.php:279]
#3  require_once(D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\modules\page\inc\page.main.php) called at [D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\modules\page\page.php:43]
#4  require_once(D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\modules\page\page.php) called at [D:\Dropbox\Xampp\htdocs\default_sienna_clean_install_clean_db\index.php:126]

 

I made different attempt to see if I could fix it but if I change something at least the sql error dissapears but than I recieve a syntax error cause it expects a string.
I searched around and I found some site which was referring to the $sort allowing sql injection cause it did not santatize. I figured sine the issue seems to be with the $sort part something has changes since this plugin was first written. But looking at other plugins I can not discover how to change it so it works again. I made some tries with "explode" which I saw used in other plugins without luck.

Since pagesiblings is working on this website I hope the fix can maybe shared?
I got the plugin from github.

I tried with 0.9.14 and with 0.9.16 (this is a clean install!) and both give that error.

]]>
Paz, 26 Oca 2014 15:26:31 -0000