<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Pagesiblings gives an sql error</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Wed, 08 Apr 2026 16:18:44 -0000</pubDate>

		<item>
			<title>foxhound</title>
			<description><![CDATA[<p>Thanks very much Twiebie, that works perfectly! :)</p>
]]></description>
			<pubDate>Sun, 26 Jan 2014 16:43:18 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7672&d=0#post39091]]></link>
		</item>
		<item>
			<title>Twiebie</title>
			<description><![CDATA[<p>Replace line 10 and 11 in pagesiblings.php with:</p>

<pre class="brush:php;">
$sort = 'page_'.$cfg['page']['cat_'.$pag['page_cat']]['order'];
$way = $cfg['page']['cat_'.$pag['page_cat']]['way'];</pre>

<p> </p>
]]></description>
			<pubDate>Sun, 26 Jan 2014 15:50:44 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7672&d=0#post39090]]></link>
		</item>
		<item>
			<title>foxhound</title>
			<description><![CDATA[<p>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:</p>

<p> </p>

<pre class="brush:php;">
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-&gt;query(SELECT * FROM cot_pages WHERE page_cat = ? ORDER BY page_ , Array ([0] =&gt; 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]</pre>

<p> </p>

<p>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.<br />
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.<br /><br />
Since pagesiblings is working on this website I hope the fix can maybe shared?<br />
I got the plugin from github.</p>

<p>I tried with 0.9.14 and with 0.9.16 (this is a clean install!) and both give that error.</p>
]]></description>
			<pubDate>Sun, 26 Jan 2014 15:26:31 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7672&d=0#post39089]]></link>
		</item>
	</channel>
</rss>