Forums / Cotonti / Extensions / Support / Attachments plugin shows SQL error 42000

staleo
#38257 2013-10-29 08:15

Hi Alex300,

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.

Allright, I installed the Attachments 2. But, that's what I see when clicking on the "Upload files" link: http://joxi.ru/blxvUtg5CbAnZRMNXio. 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?

Second (but probably it's a sequence of the above issue), the attaching the files is not working: http://joxi.ru/uG1vUtg5CbBgb-CZu2Q 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.

Добавлено 33 минуты спустя:

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

POST http://domain.ru/index.php?r=attach2&a=upload&area=page&item=15

500 Internal Server Error

...while http://domain.ru/index.php?r=attach2&a=display&area=page&item=15 is fine.

Добавлено 2 часа спустя:

Moreover, take a look:

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

That seems like an SQL-field att_area is somehow missing.

Добавлено 2 часа спустя:

The solution for me was to run an SQL-injection from here: https://github.com/trustmaster/cot-attach2/blob/master/attach2/setup/upgrade_2.0.sql

For some reason, it wasn't mentioned on the plugin description page.

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?

This post was edited by staleo (2013-10-29 13:03, 10 years ago)