DB Error: Unknown column 'pa.paper_id' in 'on clause'

Hi all,
I am running OCS Version 2.3.2.0 ( July 8, 2010 - 06:07 )
For some (just for some) earlier SchedConf proceedings, the system gives me the above error when I tried to access any paper of that conference.
For example: http://adcont.net/index.php/adcont/adcont2012/paper/view/751/180
When I turn on the database debug output the answer is:

(mysql): SELECT pa., a., COALESCE(ttl.setting_value, ttpl.setting_value) AS track_title, COALESCE(tal.setting_value, tapl.setting_value) AS track_abbrev, v.setting_value AS type_name FROM published_papers pa, papers a LEFT JOIN tracks t ON t.track_id = a.track_id LEFT JOIN paper_settings ps ON (pa.paper_id = ps.paper_id AND ps.setting_name = “sessionType”) LEFT JOIN controlled_vocab_entry_settings v ON (ps.setting_value = v.controlled_vocab_entry_id AND v.setting_name = “name”) LEFT JOIN track_settings ttpl ON (t.track_id = ttpl.track_id AND ttpl.setting_name = ‘title’ AND ttpl.locale = ‘pt_BR’) LEFT JOIN track_settings ttl ON (t.track_id = ttl.track_id AND ttl.setting_name = ‘title’ AND ttl.locale = ‘pt_BR’) LEFT JOIN track_settings tapl ON (t.track_id = tapl.track_id AND tapl.setting_name = ‘abbrev’ AND tapl.locale = ‘pt_BR’) LEFT JOIN track_settings tal ON (t.track_id = tal.track_id AND tal.setting_name = ‘abbrev’ AND tal.locale = ‘pt_BR’) WHERE pa.paper_id = a.paper_id AND pa.public_paper_id = ‘751’ AND a.sched_conf_id = ‘9’
1054: Unknown column ‘pa.paper_id’ in 'on clause’
** ADOConnection._Execute(SELECT pa.,**
** a.
,**
** COALESCE(ttl.setting_value, ttpl.setting_value) AS track_title,**
** COALESCE(tal.setting_value, tapl.s…) % line 845, file: adodb.inc.php**
** ADOConnection.Execute(SELECT pa.,**
** a.
,**
** COALESCE(ttl.setting_value, ttpl.setting_value) AS track_title,**
** COALESCE(tal.setting_value, tapl.s…, Array[10]) % line 76, file: DAO.inc.php**
** DAO.retrieve(SELECT pa.,**
** a.
,**
** COALESCE(ttl.setting_value, ttpl.setting_value) AS track_title,**
** COALESCE(tal.setting_value, tapl.s…, Array[10]) % line 440, file: PublishedPaperDAO.inc.php**
** PublishedPaperDAO.getPublishedPaperByPublicPaperId(9, 751) % line 462, file: PublishedPaperDAO.inc.php**
** PublishedPaperDAO.getPublishedPaperByBestPaperId(9, 751, false) % line 434, file: PaperHandler.inc.php**
DB Error: Unknown column ‘pa.paper_id’ in ‘on clause’

I verified the publishedpaperDAO.inc.php but I can’t find the problem, and I don’t know why form some SchedConf it works and for some it doesn’t.

Can somebody help me?

I just noticed that the entire conference files/public/folders disappeared!
And I simply don’t know why! Can it be some kind of attack?

Hi @bufoni,

OCS 2.3.2 is extremely old – I would recommend upgrading to the latest release (itself not particularly new) before debugging an SQL error.

As for the disappearance of the files area etc.: it looks like your files_dir (as configured in config.inc.php) is a subdirectory of your installation directory. This is a dangerous configuration, as documented in docs/README under the “Recommended Configuration” area (and on the installation form). It’s possible that someone uploaded a malicious script as a submission and invoked it via the exposed files area.

Regards,
Alec Smecher
Public Knowledge Project Team