OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Papers accepted then rejected accessible through search

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

Forum rules
What to do if you have a technical problem with OCS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved. Please note that this FAQ is OJS-centric, but most issues are applicable to both platforms.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OCS Conference Support and Discussion subforum; if you have a development question, try the OCS Development subforum.

Papers accepted then rejected accessible through search

Postby schiette » Mon Jun 14, 2010 5:23 pm

A couple of abstracts that were accepted a while ago and are now "rejected" (declined) and archived because their author can no longer attend the conference will still show up using Search. Same thing if I put their status back to "in revision". If I delete the paper after archiving, then a Search involving these papers returns a blank page. I have to clear the data cache as an admin to get back to normal.

I'm using OCS 2.1.1-2; not possible to upgrade since I'm in the middle of a conference and changed templates quite a lot.

François
schiette
 
Posts: 7
Joined: Thu Nov 27, 2008 4:10 pm

Re: Papers accepted then rejected accessible through search

Postby jmacgreg » Tue Jun 15, 2010 12:18 pm

Hi François,

I have somewhat replicated this, and have encountered some other slightly odd indexing issues. Please see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=5503 for a bug report; please feel free to CC yourself to that report for updates.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: Papers accepted then rejected accessible through search

Postby schiette » Thu Jun 17, 2010 10:48 am

The problem is probably that these accepted-then-archived papers remain listed in the "published_papers" table of the database. I'm hesitant to simply delete these entries directly into the database (any side effect?), so as a workaround, we must tell the SQL query to also check the status of the paper in the "papers" table:

In PaperSearchDAO.inc.php, add near the top an "import('paper.Paper');" which contains the definition of "SUBMISSION_STATUS_PUBLISHED".
Then add to the SQL query in function getPhraseResults the following:
    "papers pp," in the FROM section
    " pa.paper_id = pp.paper_id AND" in the WHERE section
    "pp.status = ' . SUBMISSION_STATUS_PUBLISHED . ' AND" in the WHERE section.
Here is how the query looks like afterwards:
Code: Select all
      $result = &$this->retrieveCached(
         'SELECT
            o.paper_id,
            COUNT(*) AS count
         FROM
            published_papers pa,
            papers pp,
            sched_confs i,
            paper_search_objects o
         NATURAL JOIN ' . $sqlFrom . '
         WHERE
            pa.paper_id = o.paper_id AND
            pa.paper_id = pp.paper_id AND
            pp.status = ' . SUBMISSION_STATUS_PUBLISHED . ' AND
            i.sched_conf_id = pa.sched_conf_id AND ' .
            $sqlWhere . '
         GROUP BY o.paper_id
         ORDER BY count DESC
         LIMIT ' . $limit,
         $params,
         3600 * $cacheHours // Cache for 24 hours
      );

I don't know if it may prevent some results to show up or induce other side effects but I don't see any reason why a paper that has its status "PUBLISHED" in the table "papers" whould not be listed in the table "published_papers" anyway. The contrary appears to be the problem: a paper listed in "published_papers" may have its status entry not being set to "PUBLISHED" in the table "papers".

Anyway, use it at your own risks!

François
schiette
 
Posts: 7
Joined: Thu Nov 27, 2008 4:10 pm

Re: Papers accepted then rejected accessible through search

Postby asmecher » Fri Jun 18, 2010 2:38 pm

Hi François,

Yes, that fix is correct -- I've posted an equivalent patch for the OCS 2.3.1 and 2.3.2 releases. Thanks for contributing!

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9083
Joined: Wed Aug 10, 2005 12:56 pm


Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests