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

staleo
#1 2013-10-28 13:31

Hi everyone,

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

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

Fatal error

2013-10-28 13:25

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

Any thoughts on how to deal with it? I would gladly see any of the solutions.

Alex300
#2 2013-10-28 14:48
Есть миры, не здесь, там, где небеса горят, и моря засыпают, и реки дремлют; люди сделаны из дыма, а города – из песен. Где-то опасность, где-то несправедливость, даже где-то остыл чай. Идем Эйс, у нас много работы!...
...Sorry for my english...
Бесплатные расширения для Cotonti: https://lily-software.com/free-scripts/
staleo
#3 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?


Bu konu staleo tarafından düzenlendi(2013-10-29 13:03, 10 yıllar önce)