OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

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

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

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

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.

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 OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby JohnGrobler » Thu Aug 12, 2010 3:22 am

Good day,

I've performed a full product upgrade from OJS 2.2.2-0 to OJS 2.3.2-1 by following the documented upgrade instructions (deploy new code, copy public & files folders, configure config.inc.php, backup DB and run PHP upgrade script via CLI etc). The database upgrade script completed successfully and I've verified the version number to be correct. After further testing we've detected the following three issues:

1) The abstract view screen for all articles is blank. Only the right hand side column with the table of contents, search journal etc is displayed but no abstract content. This applies to all articles which were upgraded from the 2.2.2-0 database; when creating a new article on the 2.3.2-1 site after the upgrade the abstract is displayed properly.

2) Incorrect files are allocated to copyediting steps on the Home > User > Editor > Submissions > #number > Editing screen. For example, on one of our articles only step 1 had the file 893-4950-2-CE.doc attached before the upgrade. After the upgrade, step 1-3 all had the same file attached (893-4950-2-CE.doc), even though step 2 still does not have a complete/acknowledge date and step 3 does not have a request date yet.

3) On webpages created via the Static Webpage plugin, the displayed login block does not seem to load the language files correctly when viewing the generated static webpage in logged-out mode. To replicate: log out, click on link to view static webpage. The login block on this page will display:

Login here
##user.username##
##user.password##
Remember me
##user.login##

Any help would be appreciated, please let me know how we can proceed to debug the above issues.

Thanks,
John Grobler
JohnGrobler
 
Posts: 51
Joined: Mon Dec 07, 2009 1:41 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby asmecher » Thu Aug 12, 2010 9:08 am

Hi John,

I suspect these have all been fixed in the current git head -- OJS 2.3.2 and 2.3.2-1 are maintenance releases and doesn't contain a lot of fixes and new features that have been committed since 2.3.1 was released. I'll try to track down the relevant patches, but you can generally find this stuff by exploring Bugzilla http://pkp.sfu.ca/bugzilla or github http://github.com/pkp.

1) I'm not sure what is causing this -- could you check your system's error log? There's a note on what to do with blank pages in the FAQ.

2) See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=4828

3) See http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=5073

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

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby JohnGrobler » Fri Aug 13, 2010 12:16 am

Hi Alec,

Thanks for the feedback and links.

1) I've enabled browser error reporting to determine that this issue has been reported here: viewtopic.php?f=8&t=6369 (file location replaced by [path]):

Code: Select all
Fatal error: Call to undefined method PublishedArticle::getLocalizedHideCoverPageAbstract() in /[path]/pages/article/ArticleHandler.inc.php on line 232


I've tried to delete the reference to the problematic procedure by removing this code from line 232:
Code: Select all
&& !$article->getLocalizedHideCoverPageAbstract($locale)


This however caused another error:
Code: Select all
Fatal error: Call to undefined method PublishedArticle::getLocalized() in /[path]/pages/article/ArticleHandler.inc.php on line 240


I've also downloaded and replaced the /pages/article/ArticleHandler.inc.php file by the latest one from GIT but the same error occurs.

2) The patch seems to fix the DB upgrade script, is there any way to resolve incorrect file assignments if the database has already been upgraded?

3) Resolved!

Thank you,
John Grobler
JohnGrobler
 
Posts: 51
Joined: Mon Dec 07, 2009 1:41 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby asmecher » Fri Aug 13, 2010 10:22 am

Hi John,

For 1), see http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=5730 for a patch.

For 2), the easiest thing to do is to re-upgrade your database, i.e. load from backup, apply the patch, and run the update script. The only alternative would be to merge data from a backup into your live database, which is possible but will be tricky. If you're not able to re-load from back-up and re-upgrade, but you do have a backup on hand, let me know and we might be able to put something together.

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

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby JohnGrobler » Sat Aug 14, 2010 3:07 am

Hi Alec,

1) All article abstract views are working again, thanks!

2) I do have a backup of the pre-upgrade database, the only problem is that new articles etc have already been added to the upgraded database. Which table(s) contain the links to files for the copyediting steps? How would you recommend I approach the merging of the tables, will I be able to replace the re-upgraded table with the current upgraded one and just add the additional row entries for files uploaded in the past few days on the upgraded site?
JohnGrobler
 
Posts: 51
Joined: Mon Dec 07, 2009 1:41 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby asmecher » Tue Aug 17, 2010 10:25 am

Hi John,

To merge the data from your old database, try the following.

Note that I HAVE NOT tested this very thoroughly, so PLEASE perform this on a test copy before you go live with it and make sure you have good backups.

1. Dump your old database into a new MySQL database called e.g. ojsold

2. Log into your test / production database and delete the broken signoff data:
Code: Select all
DELETE s FROM signoffs s, ojsold.copyed_assignments c WHERE c.article_id = s.assoc_id AND s.assoc_type = 257 AND (s.symbolic = 'SIGNOFF_COPYEDITING_INITIAL' OR s.symbolic = 'SIGNOFF_COPYEDITING_AUTHOR' OR s.symbolic = 'SIGNOFF_COPYEDITING_FINAL');

3. In your test / production database, re-insert the data by cross-querying from your ojsold database (created in step 1):
Code: Select all
INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_INITIAL', 257, c.article_id, c.copyeditor_id, a.copyedit_file_id, c.initial_revision, c.date_notified, c.date_underway, c.date_completed, c.date_acknowledged FROM ojsold.copyed_assignments c LEFT JOIN ojsold.articles a ON (c.article_id = a.article_id AND c.initial_revision > 0) AND c.copyeditor_id IS NOT NULL;

INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_AUTHOR', 257, c.article_id, a.user_id, a.copyedit_file_id, c.editor_author_revision, c.date_author_notified, c.date_author_underway, c.date_author_completed, c.date_author_acknowledged FROM ojsold.copyed_assignments c LEFT JOIN ojsold.articles a ON (c.article_id = a.article_id AND c.editor_author_revision > 0) WHERE a.user_id IS NOT NULL;

INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_FINAL', 257, c.article_id, c.copyeditor_id, a.copyedit_file_id, c.final_revision, c.date_final_notified, c.date_final_underway, c.date_final_completed, c.date_final_acknowledged FROM ojsold.copyed_assignments c LEFT JOIN ojsold.articles a ON (c.article_id = a.article_id AND c.final_revision > 0) AND c.copyeditor_id IS NOT NULL;
Please let me know how well this works.

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

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby JohnGrobler » Sun Sep 05, 2010 4:09 pm

Hi Alec,

Thank you for the SQL, unfortunately it did not resolve the issue yet. What I did:

1) I could not access both databases in a single query (different login details), so I've loaded the two tables from the old database into the new test one:
Code: Select all
[dump copyed_assignments from old database]
[dump articles from old database]
rename table articles to articles_new [upgraded test database]
[restore dump of articles to upgraded test database]
[restore dump of copyed_assignments to upgraded test database]
rename table articles to articles_old [upgraded test database]
rename table articles_new to articles [upgraded test database]


2) My hosting provider did not support your SQL (MySQL complained about safe mode enabled), so I dumped and restored the database to a local MySQL deployment, executed the modified queries below and restored the new database back to my hosting provider (test site):

Code: Select all
DELETE s FROM signoffs s, copyed_assignments c WHERE c.article_id = s.assoc_id AND s.assoc_type = 257 AND (s.symbolic = 'SIGNOFF_COPYEDITING_INITIAL' OR s.symbolic = 'SIGNOFF_COPYEDITING_AUTHOR' OR s.symbolic = 'SIGNOFF_COPYEDITING_FINAL');

INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_INITIAL', 257, c.article_id, c.copyeditor_id, a.copyedit_file_id, c.initial_revision, c.date_notified, c.date_underway, c.date_completed, c.date_acknowledged FROM copyed_assignments c LEFT JOIN articles_old a ON (c.article_id = a.article_id AND c.initial_revision > 0) AND c.copyeditor_id IS NOT NULL;

INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_AUTHOR', 257, c.article_id, a.user_id, a.copyedit_file_id, c.editor_author_revision, c.date_author_notified, c.date_author_underway, c.date_author_completed, c.date_author_acknowledged FROM copyed_assignments c LEFT JOIN articles_old a ON (c.article_id = a.article_id AND c.editor_author_revision > 0) WHERE a.user_id IS NOT NULL;

INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id, file_id, file_revision, date_notified, date_underway, date_completed, date_acknowledged) SELECT 'SIGNOFF_COPYEDITING_FINAL', 257, c.article_id, c.copyeditor_id, a.copyedit_file_id, c.final_revision, c.date_final_notified, c.date_final_underway, c.date_final_completed, c.date_final_acknowledged FROM copyed_assignments c LEFT JOIN articles_old a ON (c.article_id = a.article_id AND c.final_revision > 0) AND c.copyeditor_id IS NOT NULL;


Each of the above SQL statements inserted/deleted more than 100 rows.

3) After visiting the Home > User > Editor > Submissions > #number > Editing screen on my new test site, I now receive an error in step 2:
Code: Select all
Fatal error: Call to a member function getDateNotified() on a non-object in /usr/www/users/username/cache/t_compile/%%B0^B03^B0335942%%copyedit.tpl.php on line 151


Any further help would be appreciated.

Regards,
John Grobler
JohnGrobler
 
Posts: 51
Joined: Mon Dec 07, 2009 1:41 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby mcrider » Thu Sep 09, 2010 10:54 am

Hi John,

Have you tried clearing your caches (from the Site Admin's user home page)?

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby JohnGrobler » Tue Oct 26, 2010 11:46 pm

Hi Matt,

Thank you for the reply. Clearing the caches did not make a difference with this issue (issue #2). We did however start to receive this error message (Call to a member function getDateNotified() on a non-object in /usr/www/users/username/cache/t_compile/%%B0^B03^B0335942%%copyedit.tpl.php on line 151) on more upgraded sites (latest occurrence on OJS 2.3.3.1). We've detected the following cause in the code:

In the file: /templates/sectionEditor/submissions/copyedit.tpl
Whenever the getDate* functions are called referencing the signoff of the different phases of the journal acceptance, it fails to check if the row corresponding to the current phase exists in the database. If the row does not exist, the object becomes null, and the call fails, breaking the template.

Is this a known issue, I could not find a bugfix?

Thanks,
John Grobler
JohnGrobler
 
Posts: 51
Joined: Mon Dec 07, 2009 1:41 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby mcrider » Fri Oct 29, 2010 2:55 pm

Hi John,

I think not all of the signoffs that should have been created/added to your DB are there, i.e. the copyediting signoffs... These signoffs are created when the article is submitted, regardless if the article actually goes through copyediting. So for each article, you should see this in your signoffs table (the first 4 columns anyway, the rest can be empty), where assoc_id (1 in this case) is the article ID in question.
Code: Select all
signoff_id     symbolic                          assoc_type     assoc_id
1            SIGNOFF_COPYEDITING_INITIAL         257         1
2            SIGNOFF_COPYEDITING_AUTHOR      257         1
3            SIGNOFF_COPYEDITING_FINAL         257         1
4            SIGNOFF_LAYOUT               257         1
5            SIGNOFF_PROOFREADING_AUTHOR      257         1
6            SIGNOFF_PROOFREADING_PROOFREADER   257         1
7            SIGNOFF_PROOFREADING_LAYOUT      257         1


If you aren't seeing this set of signoffs for each article, you should be able to create them manually to fix the issue.

Cheers,
Matt
mcrider
 
Posts: 952
Joined: Mon May 05, 2008 10:29 am
Location: Vancouver, BC

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby JohnGrobler » Fri Nov 05, 2010 12:05 am

Thanks Matt, issue #2 has been resolved by manually adding the SIGNOFF_COPYEDITING_AUTHOR as per your comments. SQL code example:
Code: Select all
INSERT INTO signoffs (symbolic, assoc_type, assoc_id, user_id) VALUES ('SIGNOFF_COPYEDITING_AUTHOR', '257', '184', '0')


Regards,
John Grobler
JohnGrobler
 
Posts: 51
Joined: Mon Dec 07, 2009 1:41 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby Mindilsaan » Tue Nov 30, 2010 4:25 pm

I also experienced the broken copyedit template for articles that were loaded before the upgrade, and I was able to fix the problem by modifying John's example INSERT statement. I noticed that SIGNOFF_COPYEDITING_AUTHOR was the missing record for all the affected articles in my case. Thank you for sharing the manual fix.
Mindilsaan
 
Posts: 1
Joined: Wed Sep 08, 2010 6:07 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby robinhood1362 » Wed Dec 08, 2010 1:13 am

Hi all,

Upgrading from 2.2.4.0 to 2.3.3-3 runs to an error. However, refreshing the page shows upgrade successful page, but lists an error "Table 'ojs.copyed_assignments' doesn't exist"

Is it an un-applied patch issue? Any thoughts?

Thanks for your response,
Sina
robinhood1362
 
Posts: 31
Joined: Sat May 24, 2008 3:27 pm

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby asmecher » Wed Dec 08, 2010 10:15 am

Hi Sina,

Yes, I suspect the patch wasn't fully applied. (Do you have the output from the patch process?) After upgrading to OJS 2.3.3-3, the copyed_assignments table should no longer be used. The contents should be migrated instead to the new "signoffs" table.

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

Re: 3 issues after upgrading from OJS 2.2.2-0 to 2.3.2-1

Postby robinhood1362 » Thu Dec 09, 2010 1:32 am

Hi Alec,
And thanks for the response.
What I did was: I downloaded the full package, deleted the old files after backup, copied the new files, and I used the web upgrade interface.
I wonder what the output from the patch process is. Where should I get it from?

Thanks again,
Sina
robinhood1362
 
Posts: 31
Joined: Sat May 24, 2008 3:27 pm

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: hehe, Tiziano and 6 guests