1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

List CSV Export creating CPGZ

Discussion in 'Community' started by dboggs1994, Jan 4, 2018.

  1. dboggs1994

    dboggs1994 New Member

    Level: Community
    I am using a MAC and when I export the list data using export to csv the file being generated in a zip file in CPGZ format. I can extract the zip but have to add the csv extension before I can import into excel. Is this normal behavior for Fabrik?
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    No.
    Depending on your settings it should export standard CSV (comma separated, UTF8) or Excel CSV (which can be directly opened with Excel).

    Which Joomla and Fabrik version?
    Standard Joomla template (Protostar)?
    Any 3rd party components, plugins...?
     
  3. dboggs1994

    dboggs1994 New Member

    Level: Community
    Thanks for the speedy reply, I am on Joomla 3.6.5, using Protostar to render the Fabrik forms, as for 3rd party plug-ins I do have a number of them. Just attempted this on my local machine and got the same result on a fairly clean copy of Joomla.
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Local machine as server?
     
  5. dboggs1994

    dboggs1994 New Member

    Level: Community
    I have a local instance running under MAMP on my fairly robust laptop.
     
  6. troester

    troester Well-Known Member Staff Member

    Level: Community
    Hmm

    components\com_fabrik\models\csvexport.php
    is doing 'application/zip' (line 425 and 431)
    I don't know why (historical reasons?)

    This is working on unix and windows servers, maybe not on Mac.
    I just tested on my local Windows (XAMPP), 'text/comma-separated-values' is working, too.

    Maybe this is the more appropriate MimeType...
     
  7. dboggs1994

    dboggs1994 New Member

    Level: Community
    Ok thanks will look into that.
     
  8. dboggs1994

    dboggs1994 New Member

    Level: Community
    Thanks for the pointers, using 'text/comma-separated-values' didn't work for me, however using 'text/vnd.ms-excel' did, at least locally.
     
  9. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    I remember there was a reason we set that MIME type, but it was so long ago I can't remember why. I have a vague memory that it was something to do with Mac vs everything else. And back then, the text/comma-separated-values MIME type either didn't exist, or virtually nothing supported it.

    If anyone wants to try different MIME types and find one that Mac and "everything else" can agree on, I'm all for it ...

    -- hugh
     
  10. EricWebsite

    EricWebsite Member

    Level: Community
    Hi,

    Never had any problem with this issue untill now. The site is on a Unix server.
    Downloaded files suddenly get a .zip extension in Windows 10, despite an explicit .csv in the Fabrik filename.
    This previously was not the case, and in Fabrik nothing changed, so it must be a Windows update??

    Anyway, the problem can be solved by changing the MIME type into 'text/csv' (2 occurrences) in components/com_fabrik/models/csvexport.php.

    And suggest that it can be modifies in the next Fabrik update too?
     
    troester likes this.
  11. troester

    troester Well-Known Member Staff Member

    Level: Community
    It seems only Firefox is taking this MIME type litterally, Chrome, Opera, Edge are creating a csv on Windows (despite MimeEncoding and header Content-Type are zip in Fabrik).

    Did anybody test on Mac?
     
  12. troester

    troester Well-Known Member Staff Member

    Level: Community

Share This Page