OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Email log empty

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.

Email log empty

Postby aleskl » Mon Oct 01, 2012 6:31 am

Dear OJS developers!

Something happened to our email logs - the Email log under the History tab for the article contains only very recent emails. We did and upgrade to 2.4.0 at September 13th, and all the emails that are now recorded in the Email log are newer - that is why I suspect it has something to do with the upgrade. Older emails dissapeared from logs. Is it possible to restore them?

Thanks,
Ales
aleskl
 
Posts: 98
Joined: Mon Apr 11, 2011 7:08 am

Re: Email log empty

Postby JasonNugent » Mon Oct 01, 2012 6:56 am

Hi Ales,

What version did you upgrade from?

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 877
Joined: Tue Jan 10, 2006 6:20 am

Re: Email log empty

Postby aleskl » Mon Oct 01, 2012 7:01 am

Upgraded to 2.4.0 from 2.3.6.

I can see older emails in the database, they just don't show on the webpage.
aleskl
 
Posts: 98
Joined: Mon Apr 11, 2011 7:08 am

Re: Email log empty

Postby JasonNugent » Mon Oct 01, 2012 7:10 am

Hi Ales,

The 2.4.0 upgrade renamed the article_email_log table to 'email_log' and changed the column called 'article_id' to 'assoc_id'. I assume that this is correct on your installation? I am looking at a local install here that I upgraded (from 2.2.3 no less) and my old emails show in the history/email log.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 877
Joined: Tue Jan 10, 2006 6:20 am

Re: Email log empty

Postby aleskl » Mon Oct 01, 2012 1:24 pm

Thank you Jason, I have checked the database and it is like you wrote: 'email_log' table with 'assoc_id' column. Perhaps the function retrieving data was not updated properly? But in that case no emails would be shown. Only the new ones are shown here.

Then I looked at the values in the 'assoc-id' column. Quite a lot of records have NULL in that column. When I manually entered the number of the paper, where I first observed this problem, the email appeared in the email log! So the database is structured as it should be and the functions work ok. The problem is the NULL values in 'assoc_id'.

So the problem is not date, but apparently all emails did not get a value for 'assoc_id'. Also 'event_type' column is often NULL and there seems to be a correlation, both columns are often NULL together. I should probably check the database from the backup, but I don't know how to browse a database from an archive?

Ok, there is some connection also with the date. The last NULL assoc_id is recorded 2012-09-11 and after that a few dozens of emails were sent that all got their 'assoc_id' number. Perhaps the NULL values were introduced (randomly?) during database upgrade?

Regards,
Ales
aleskl
 
Posts: 98
Joined: Mon Apr 11, 2011 7:08 am

Re: Email log empty

Postby JasonNugent » Mon Oct 01, 2012 2:51 pm

Hi Ales,

How is your old database archived? If it was a mysql dump, you can just create a new database and import it with a mysql command via the command line. If it's a zip or an archive of the actual MySQL database table files themselves, that's a bit more work but that would be an unusual way to create a backup. I'd be interested in knowing whether or not your old article_id column contained null values. The upgrade command should have only renamed the column with no other constraints applied.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 877
Joined: Tue Jan 10, 2006 6:20 am

Re: Email log empty

Postby aleskl » Wed Oct 03, 2012 2:48 am

I did a stupid thing, mysql dump in our backup contains drop table statements and specifies exactly the database, so I overwritten the database with an old version. When I opened the webpage and saw a database error on the front page; I really started sweating. Luckily I had a quite recent backup, so I restored that and it's ok now, perhaps just some new events with the papers will be reverted, I have to check that.

But I have looked at article_email_log and some emails had NULL values in id column, so this is something that was happening before also. I'll monitor this further and see if it's happening with new emails also.
aleskl
 
Posts: 98
Joined: Mon Apr 11, 2011 7:08 am

Re: Email log empty

Postby piotreba » Tue Apr 02, 2013 2:18 pm

Hello, I experienced the same after upgrading from 2.3.8 to 2.4.2. Now I have no older email logs available (they are in DB)! What is more, some papers present email logs of different submissions... That causes a lot of troubles... Has someone found any solution?
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: Email log empty

Postby piotreba » Wed Apr 03, 2013 4:35 am

As I understood, data from the table article_email_log, column article_ID should be in the assoc_ID column, email_log table in the upgraded database (overriding existing values in the latter table)?
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: Email log empty

Postby asmecher » Wed Apr 03, 2013 9:27 am

Hi piotreba,

Between OJS 2.3.x and 2.4.x, the article_email_log table is renamed to email_log, and the columns are changed as follows:
  • article_id becomes assoc_id
  • assoc_type needs to be set to 257
This should happen during upgrade, but if you encountered errors during the upgrade process, these steps (and others) may not have been fully completed.

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

Re: Email log empty

Postby piotreba » Thu Apr 04, 2013 3:01 am

Maybe someone has any php script or other solution that would help updating this incorectly inserted data? There are thousands of emails that require correction...
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: Email log empty

Postby piotreba » Sun Apr 07, 2013 4:25 am

Ok, the case is not so serious...
Just simple UPDATE SQL statement was needed, maybe will be helpful for others:
UPDATE `pre_ojs_update_db`.`article_email_log`, `post_ojs_update_db`.`email_log` SET `post_ojs_update_db`.`email_log`.`assoc_id` = `pre_ojs_update_db`.`article_email_log`.`article_id` WHERE `post_ojs_update_db`.`email_log`.`log_id` = `pre_ojs_update_db`.`article_email_log`.`log_id`
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: Email log empty

Postby raickonen » Mon Sep 09, 2013 8:13 am

We're facing the same problem. After upgrade from 2.3.5 to 2.4.2 all old email logs are missing. They're in DB but only new ones are shown.

Any fix on this? The upgrade process was OK, no errors.
raickonen
 
Posts: 34
Joined: Tue Nov 16, 2010 10:39 am

Re: Email log empty

Postby piotreba » Mon Sep 09, 2013 11:01 am

try the solution posted above.
piotreba
 
Posts: 157
Joined: Mon Dec 13, 2010 3:29 pm

Re: Email log empty

Postby raickonen » Mon Sep 09, 2013 1:08 pm

See the next post on page 2.
Last edited by raickonen on Tue Sep 10, 2013 9:00 am, edited 1 time in total.
raickonen
 
Posts: 34
Joined: Tue Nov 16, 2010 10:39 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 3 guests

cron