New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subtable arrays may vary in column ordering #772
Comments
Attachment: |
(In [1200]) Fixes #772 |
I might do some additional investigation into the cause of the re-ordering before fixing the Csv unit tests... |
Add test cases to Csv and Html format renderers handling Piwik_DataTable_Array. |
The bug was first seen on reports from indonesia diving page which was running 5.1.6 |
Received in the mail today Visits export in CSV format has all the data scrambled across columns. If you look at the XML export, it's obvious that the fields don't always come out in the same order for all records: <result date="2009-08-26"> This must be the reason why the data in the CSV export is mis-ordered... |
matt: can you take a look at this bug? Need a fresh pair of eyes. |
(In [2178]) Refs #772 adding test showing that CSV is not affected by the misorder in columns |
CSV and HTML renderer are not affected by columns being in random orders, as they print as expected columns in order. Other reports are affected but this is OK I think, as the data is always clearly labelled and users should not rely on them being always in the same order. If i missed something please reopen |
Did we fix this? I don't know about the random case in comment:12, but the screenshot I took was from my test box. Occassionally, the results were in reverse order. |
I couldn't highlight a bug with the CSV or HTML renderer even when elements are in random orders, as the renderer make sure to write data for specific columns in order. If you can replicate a bug, please post full backtrace here. |
Did something change between php 5.2.0 and 5.2.6? I can't replicate this problem on piwik.org/demo (5.2.0).
The order of columns between subtables may not be consistent with each other. (Depends on the date range and days.) This is a problem for Csv and Html output where order is critical.
See screenshot where I queried VisitsSummary.get with a date range.
A possible fix is to use ksort() which preseves key-to-value pairings.
The text was updated successfully, but these errors were encountered: