@robocoder opened this Issue on June 9th 2009 Contributor

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.

@robocoder commented on June 9th 2009 Contributor


@robocoder commented on June 9th 2009 Contributor

(In [1200]) Fixes #772

@robocoder commented on June 12th 2009 Contributor

I might do some additional investigation into the cause of the re-ordering before fixing the Csv unit tests...

@robocoder commented on June 12th 2009 Contributor

(In [revert 1200), refs #772

@robocoder commented on June 15th 2009 Contributor

Add test cases to Csv and Html format renderers handling Piwik_DataTable_Array.

@mattab commented on August 13th 2009 Member

The bug was first seen on reports from indonesia diving page which was running 5.1.6

@mattab commented on September 25th 2009 Member

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-25">

<result date="2009-08-26">

This must be the reason why the data in the CSV export is mis-ordered...

@robocoder commented on October 12th 2009 Contributor

matt: can you take a look at this bug? Need a fresh pair of eyes.

@mattab commented on May 13th 2010 Member

(In [2178]) Refs #772 adding test showing that CSV is not affected by the misorder in columns

@mattab commented on May 13th 2010 Member

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

@robocoder commented on May 13th 2010 Contributor

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.

@mattab commented on May 14th 2010 Member

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.

This Issue was closed on May 14th 2010
Powered by GitHub Issue Mirror