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

CSV export lost List filter in Fabrik 3.8.1 (related link)

Discussion in 'Community' started by mattsh, Nov 1, 2018.

Thread Status:
Not open for further replies.
  1. mattsh

    mattsh Member

    Level: Community
    Hi!

    Have had working csv export from filtered data in a list.
    But after updating to Joomla (3.8.13) and Fabrik (3.8.1) and even testing with latest files from Github two days ago. I still have the same problem with csv export, all data is exported, not filtered.

    Any solution?

    Regards
    Matt
     
  2. troester

    troester Well-Known Member Staff Member

    Level: Community
    I can't replicate.
    What are your CSV export settings? "Include filters" =yes?
     
  3. mattsh

    mattsh Member

    Level: Community
    Did some more testing
    It only happens if I use a related data link from list 1 to list 2. And do the csv export from list 2.
    If I filter a "normal" list csv export works as expected.

    Matt
     
  4. troester

    troester Well-Known Member Staff Member

    Level: Community
    Ok, replicatable.
    It's because the related data link has the URL param &fabrik_incsessionfilters=0, which is then still in the CSV export link, which seems to reset the filter...
     
  5. mattsh

    mattsh Member

    Level: Community
    But it worked in Fabrik 3.8, can I change it so the filter is still active for related links?

    Matt
     
  6. mattsh

    mattsh Member

    Level: Community
    Someone, I think it's a bug when you can not export filtered data correctly from a list (via a related list link).
    Tested on Joomla and Fabrik 3.9 and it's the same behavior.

    Matt
     
  7. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    is this with front end options enabled? ie. with the popup that lets the user select options, or without that?

    -- hugh
     
  8. mattsh

    mattsh Member

    Level: Community
    No, not default, but after testing it's the same behavior with front end options enabled. No filtering is done.

    Matt
     
    Last edited: Nov 9, 2018
  9. mattsh

    mattsh Member

    Level: Community
    Friendly bump
     
  10. mattsh

    mattsh Member

    Level: Community
    Friendly bump
     
  11. mattsh

    mattsh Member

    Level: Community
    Friendly bump
     
  12. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Turns out it's not fabrik_incsessionfilters, although that was a good guess.

    Well, it kind of is ... the problem is with a commit a while back whereby we don't save the query string filters to the session when rendering related data links (so, if fabrik_incsessionfilters), to avoid having those filters then carry over in the session for other instances of that list. So basically, the filter isn't in the session when the CSV view is run.

    I've kind of hacked my way round it locally, I'm going to test for a while, see if my hack has any side effects, before committing it.

    What I'm doing is adding any query string element filters to the 'custom_qs' when rendering the CSV JS options, so the CSV export link generated in the list JS will then include those as simple query string filters. And added yet another "fake" query string option (fabrik_savesessionfilters), which is set to false the CSV view, to prevent those getting stored to the session as well.

    -- hugh
     
  13. troester

    troester Well-Known Member Staff Member

    Level: Community
    It's not only CSV export but also pagination:
    if you are going to the next page of the related data list it's displaying all records.
    It keeps the "related data filter" if you edit the URL and set fabrik_incsessionfilters=1
     
  14. mattsh

    mattsh Member

    Level: Community
    @cheesegrits I'm really looking forward to the solution (or my users most). :)

    Matt
     
  15. mattsh

    mattsh Member

    Level: Community
    Hi!

    Have updated to J 3.9.1 and latest Fabrik from GitHub. The CSV export works as expected back end, but front end no rows are selected in the export. Have tested different template and front end options enabled, but still no rows.

    What to do?

    Regards
    Matt
     
  16. mattsh

    mattsh Member

    Level: Community
    Works now! :)

    Regards
    Matt
     
    cheesegrits likes this.
  17. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
Thread Status:
Not open for further replies.

Share This Page