<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Attachments plugin shows SQL error 42000</title>
		<link>https://www.cotonti.com</link>
		<description>Last topic posts</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Wed, 15 Apr 2026 06:26:27 -0000</pubDate>

		<item>
			<title>staleo</title>
			<description><![CDATA[<p>Hi <strong>Alex300</strong>,</p>

<p>That's right, thanks for it. That seems the first version of Attachments is still not being fully ported for Siena, and Attachments 2 are way fresher.</p>

<p>Allright, I installed the Attachments 2. But, that's what I see when clicking on the "Upload files" link: <a href="http://joxi.ru/blxvUtg5CbAnZRMNXio" rel="nofollow">http://joxi.ru/blxvUtg5CbAnZRMNXio</a>. As you can see, it's not a sort of pop-up window, but a separate page. So is any of the js files missing?</p>

<p>Second (but probably it's a sequence of the above issue), the attaching the files is not working: <a href="http://joxi.ru/uG1vUtg5CbBgb-CZu2Q" rel="nofollow">http://joxi.ru/uG1vUtg5CbBgb-CZu2Q</a> Of course, the uploads folder is under CHMOD 777, and again, that seems, some js is missing, but which one? I'll appreciate any help on my issue.</p>

<p><strong>Добавлено 33 минуты спустя:</strong></p>

<p>This could help: in the Opera Dragonfly, after clicking Upload, I catch this 500 Server response:</p>

<p><em>POST http://domain.ru/index.php?r=attach2&amp;a=<strong>upload</strong>&amp;area=page&amp;item=15</em></p>

<p><em>500 Internal Server Error</em></p>

<p>...while <em>http://domain.ru/index.php?r=attach2&amp;a=<strong>display</strong>&amp;area=page&amp;item=15</em> is fine.</p>

<p><strong>Добавлено 2 часа спустя:</strong></p>

<p>Moreover, take a look:</p>

<blockquote>
<p>SQL error 42S22: Column not found: 1054 Unknown column 'att_area' in 'where clause'&lt;/p&gt;&lt;pre style="overflow:auto"&gt;#0  cot_diefatalColumn not found: 1054 Unknown column 'att_area' in 'where clause') called at [/var/www/staleo/data/www/domain.ru/system/database.php:478]<br />
#1  CotDB-&gt;query(SELECT * FROM cot_attach<br />
   WHERE att_area = ? AND att_item = ? ORDER BY att_order, Array ([0] =&gt; page,[1] =&gt; 17)) called at [/var/www/staleo/data/www/domain.ru/plugins/attach2/inc/attach2.upload.php:66]</p>
</blockquote>

<p>That seems like an SQL-field <strong>att_area</strong> is somehow missing.</p>

<p><strong>Добавлено 2 часа спустя:</strong></p>

<p>The solution for me was to run an SQL-injection from here: <a href="https://github.com/trustmaster/cot-attach2/blob/master/attach2/setup/upgrade_2.0.sql" rel="nofollow">https://github.com/trustmaster/cot-attach2/blob/master/attach2/setup/upgrade_2.0.sql</a></p>

<p>For some reason, it wasn't mentioned on the plugin <a href="http://www.cotonti.com/extensions/files-media/attach2">description page</a>.</p>

<p>Anyway, opening the uploading form on a separate page (instead of the floating window on the dark background) is still an issue, how do you think it's being solved?</p>
]]></description>
			<pubDate>Tue, 29 Oct 2013 08:15:54 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7566&d=0#post38257]]></link>
		</item>
		<item>
			<title>Alex300</title>
			<description><![CDATA[<p>Try to use <strong>Attacments2</strong>:  <a href="http://www.cotonti.com/extensions/files-media/attach2">http://www.cotonti.com/extensions/files-media/attach2</a></p>
]]></description>
			<pubDate>Mon, 28 Oct 2013 14:48:51 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7566&d=0#post38247]]></link>
		</item>
		<item>
			<title>staleo</title>
			<description><![CDATA[<p>Hi everyone,</p>

<p>Here's a plugin I try to inplement on my Siena 0.9.14: <a href="http://www.cotonti.com/extensions/files-media/attachments">http://www.cotonti.com/extensions/files-media/attachments</a></p>

<p>While editing a page, I choose which images to upload, click "Submit" on the very bottom of the page, and see the error report:</p>

<blockquote>
<h2 class="warning" style="color:rgb(0,0,0);font-family:Scada, sans-serif;line-height:normal;">Fatal error</h2>

<div class="warning" style="color:rgb(0,0,0);font-family:Scada, sans-serif;font-size:12px;line-height:normal;">
<p><em>2013-10-28 13:25</em></p>

<p>SQL error 42000: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE att_user = 1' at line 1</p>
</div>
</blockquote>

<p>Any thoughts on how to deal with it? I would gladly see any of the solutions.</p>
]]></description>
			<pubDate>Mon, 28 Oct 2013 13:31:09 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/forums?m=posts&q=7566&d=0#post38246]]></link>
		</item>
	</channel>
</rss>