PKP Bugzilla – Bug 6623
Views report galley views are not in the right column
Last modified: 2011-04-28 11:31:59 PDT
The galley view counts in the view report plugin are not appearing in the right column if e.g. an article has a different set of galley types than a previous article. We need to properly pad the galleys array for each article. Fix forthcoming.
Alec, I assume this should go in git-stable/the patch list?
Matt, I'm not sure I understand how this is dropping counts into the wrong column... Do you have an example case?
Created attachment 3497 [details]
Example view reports with and without positioning problem
Alec, the array merge at line 128 of ViewReportPlugin will destroy any 'positioning' we've created in the galleyViews array -- so all all view counts would be conceptually pushed to the left. if we set to '' elements that don't have any value (i.e. for an article that doesn't have that particular type of galley, though a previous article does), then we don't have the problem. I've attached an example of a before-and-after view report that should explain the issue.
I see -- but the fix is a little scattered IMO. Why not use count($galleyLabels) instead of that tracking variable? Should work OTOH.
Created attachment 3499 [details]
Patch against OJS pre-2.3.5
Yep, thats a good deal cleaner. Here's a patch, which has been pushed to stable (https://github.com/pkp/ojs/commit/03b8e6c8c8c31509ec91c81fc22a9ee634ce2509).