OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



encoding error with statistics in 2.4.3

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.

encoding error with statistics in 2.4.3

Postby jhallida » Thu Apr 10, 2014 2:24 pm

Hi,

We've had several issues with getting statistics working correctly in OJS 2.4.3, but we seem to be stuck on one final problem. The vast majority of our log files (the ones generated by OJS itself) are throwing exceptions when we try to process them. This means the files get stuck in the 'processing' folder and never get processed. When I try to run the process manually, I usually see this output "DB ERROR: invalid byte sequence for ...". Sometimes instead, I get a Syntax error instead around the SQL insertion text.

The postgres DB is set to UTF-8. All PHP settings are set to UTF-8. Any ideas what I'm doing wrong?

Thanks,

- Jim Halliday
jhallida
 
Posts: 24
Joined: Fri Aug 20, 2010 8:03 am

Re: encoding error with statistics in 2.4.3

Postby jhallida » Fri Apr 11, 2014 9:44 am

OK, I have identified the problem. The country/city names coming out of the GeoLiteCity database file are NOT UTF-8. Everything else in our workflow is UTF-8. Is there a workaround, or should I attempt to convert the GeoLiteCity DB to UTF-8?
jhallida
 
Posts: 24
Joined: Fri Aug 20, 2010 8:03 am

Re: encoding error with statistics in 2.4.3

Postby jhallida » Sun Apr 13, 2014 7:10 am

I have identified a bug in the code in plugins/generic/usageStats/UsageStatsTemporaryRecordDAO.inc.php. This was the final piece preventing me from getting statistics working properly. This method:

function deleteRecord($assocType, $assocId, $loadId) {
return $this->update('DELETE from usage_stats_temporary_records
WHERE assoc_type = ? AND assoc_id = ? AND load_id = ?
ORDER BY day DESC
LIMIT 1',
array($assocType, $assocId, $loadId));
}

Has a syntax error --- trying to use ORDER with a DELETE doesn't work.
jhallida
 
Posts: 24
Joined: Fri Aug 20, 2010 8:03 am

Re: encoding error with statistics in 2.4.3

Postby jhallida » Mon Apr 14, 2014 9:11 am

Given the lack of response no one may be interested in this, but here's another problem:

In our multi-journal environment, some journals have unique URLs that don't match the regular URL structure. None of these journals are showing in the statistics output, probably since they need different URL parsing and are thus getting filtered out.
jhallida
 
Posts: 24
Joined: Fri Aug 20, 2010 8:03 am

Re: encoding error with statistics in 2.4.3

Postby asmecher » Mon Apr 14, 2014 9:19 am

Hi Jim,

Don't worry, we're paying attention -- just preparing a thorough response. Stay tuned.

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

Re: encoding error with statistics in 2.4.3

Postby bbeghelli » Wed Apr 16, 2014 6:34 am

Hi jhallida,

Can you try applying the following patch: https://github.com/pkp/ojs/commit/fb069 ... 55549.diff
It should fix the problem with delete and limit. Thanks for letting us know.

Related to your second problem, with urls, can you send me an example of how different your urls are?

Thanks.
bbeghelli
 
Posts: 144
Joined: Tue Jun 25, 2013 2:22 pm

Re: encoding error with statistics in 2.4.3

Postby jhallida » Wed Apr 16, 2014 10:42 am

Thanks for the reply! As for the second problem, here is the relevant part of the config file:

base_url = "http://scholarworks.iu.edu/journals"
base_url[josotl] = "http://josotl.indiana.edu"
base_url[jotlt] = "http://jotlt.indiana.edu"
base_url[index] = "http://scholarworks.iu.edu/journals/index.php/index"

What is happening is that I see JOSOTL and JOTLT journal hits show up in the logs generated by OJS, but when the logs are processed they show zero hits for these journals. I think something in the way the URL is being parsed out using the 'base_url' is messing things up.
jhallida
 
Posts: 24
Joined: Fri Aug 20, 2010 8:03 am

Re: encoding error with statistics in 2.4.3

Postby bbeghelli » Wed Apr 16, 2014 11:02 am

Hi jhallida,

You are absolutely right. Sorry for that, you fell into two bugs at once. This second bug is already filled, and a fix is ready. I am just testing it more to make sure it really works and breaks nothing. Here is the bug entry, stay tuned for a patch release really soon.

http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8664

Thanks.
bbeghelli
 
Posts: 144
Joined: Tue Jun 25, 2013 2:22 pm

Re: encoding error with statistics in 2.4.3

Postby jhallida » Wed Apr 16, 2014 12:51 pm

Thanks I appreciate the prompt reply!
jhallida
 
Posts: 24
Joined: Fri Aug 20, 2010 8:03 am

Re: encoding error with statistics in 2.4.3

Postby bbeghelli » Wed May 07, 2014 4:34 am

Hi jhallida,

OJS 2.4.4 is released now. I recommend you to upgrade, instead of applying patches. It will be less work and you will get also other fixes and improvements. Let me know if anything goes wrong.

Regards,
Bruno
bbeghelli
 
Posts: 144
Joined: Tue Jun 25, 2013 2:22 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Majestic-12 [Bot] and 5 guests