We are moving to Git Issues for bug tracking in future releases. During transition, content will be in both tools. If you'd like to file a new bug, please create an issue.

Bug 6623 - Views report galley views are not in the right column
Views report galley views are not in the right column
Product: OJS
Classification: Unclassified
Component: Plug-ins
To be determined
All All
: P3 normal
Assigned To: PKP Support
Depends on:
  Show dependency treegraph
Reported: 2011-04-27 16:32 PDT by Matthew Crider
Modified: 2011-04-28 11:31 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:

Example view reports with and without positioning problem (598 bytes, application/empty)
2011-04-27 18:16 PDT, Matthew Crider
Patch against OJS pre-2.3.5 (702 bytes, patch)
2011-04-28 11:31 PDT, Matthew Crider
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Crider 2011-04-27 16:32:30 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.
Comment 1 Matthew Crider 2011-04-27 16:45:29 PDT
Alec, I assume this should go in git-stable/the patch list?

Comment 2 Alec Smecher 2011-04-27 17:50:28 PDT
Matt, I'm not sure I understand how this is dropping counts into the wrong column... Do you have an example case?
Comment 3 Matthew Crider 2011-04-27 18:16:13 PDT
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.
Comment 4 Alec Smecher 2011-04-28 08:56:43 PDT
I see -- but the fix is a little scattered IMO. Why not use count($galleyLabels) instead of that tracking variable? Should work OTOH.
Comment 5 Matthew Crider 2011-04-28 11:31:02 PDT
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).