I have tried to dig into the code hoping to understand a bit more, how contents are re-arranged but I feel like i am lost. Can any one please give some feedback or suggestion where else I can find more info. Attached is the code where I try to debug to get more information Thanks for any help!
Can anyone please help us explain the discrepancy in view of data? Any comment, suggestions, pointer to potential resolution, we really appreciate and would like to hear from. Thanks all!
Dung.
As much as possible we try to calculate those counts in the SQL, for efficiency’s sake. To nail down exactly what the difference is, I’d suggest fishing out the queries that generate those counts. If you’re having trouble finding it in the code, you can do this in both OJS 2.x and 3.x by turning on debug option in config.inc.php. This will dump all SQL statements out to the browser (for all users who visit the site while it’s enabled!) so you’ll be able to find the relevant query on the page you posted above. (If the page is generated by an AJAX request, you might need to capture it from your browser’s inspection tools, as the SQL statements will make the JSON response unparseable.)
My suspicion is that you’ve got a data issue, i.e. some missing entities in your database or something similar. OJS 2.x and 3.x have similar requirements for data integrity but will behave a little differently when those requirements aren’t met. One common cause of issues like this, just to give an example that may not be 100% relevant to your case, is articles that are designated against a section_id that doesn’t exist. Both OJS 2.x and 3.x consider this a data error, but they’ll behave differently with it.
Regards,
Alec Smecher
Public Knowledge Project Team