Using advanced search disturbs export trigering

lcollong

FabriKant d'applications web
Hi,

I have a list on which the export is set to use the filtering. Without filtering the list the export goes well. But for time to time if the list is filtered the export never start. It's specially the case when using advanced filtering.

In the screenshots you can see a test I have done using advanced filtering to show only this year records. The list is build with the right data but clicking on the export link opens the window but the record counting never start. You can reproduce this on the test drive indicated on "mysites", you have to go the front, connect yourself, choose the menu item "Tableau de bord" and do some export tests.

I have to say that sometimes it triggers, and some time not. Using firebug shows some time an error 500. On the production site it is exactly the same case (kind of "random" behavior).
 

Attachments

  • Capture.JPG
    Capture.JPG
    49.5 KB · Views: 511
  • Capture2.JPG
    Capture2.JPG
    41.6 KB · Views: 429
Done. But it does not change a lot. Strange enough : from time to time : it works (with the same filter). Some time refreshing the page makes it start but it can also stop after one or two "block" of 100 records.... Also the messages in the window saying "loading :" and "file save to" as displayed as "undefined" but not all the time ! Cache problem ?
 
the issue is the way the advanced filter stores the date (when using a < or > condition) - it wraps the value in quotes, which later on we try to pass as a date and it fails
Are you always testing with the same advanced search as you outlined in the screen shots in your initial post?
For me in my test site the issue wasn't random, it really happened every time.
If you use firefox and try to export the csv file. When the 500 error is generated could you open the 'response' tab of the ajax request which is visible in firebug and copy and paste the text which is shown please? That should show the error that is generating the 500 response.
 
Are you always testing with the same advanced search as you outlined in the screen shots in your initial post?
yes

The response tab in "usual way" is tremendous ! It is also plenty of references of my server. I'd prefer not post that here. Sould I send it to you by mail ?

If firebug is on, I have been able to generate an error using a small number of lines in the list (5) and clicking for the page 2. I got :

500 - DateTime::__construct(): Failed to parse time string ((2013-12-31 23:00:00)) at position 0 ((): Unexpected character

It seems that the error is generated before the export is activated (I mean error on the page displayed). A TimeZone problem ? (the date bellow is UTC, in local time it is 2014-01-01 with no hour (zero)).
 
Rob,

I did a complete today fabrik update from last master zip but it's still not working. It's now showing an error 500 in firebug as soon as it displays the list without any filtering nor export attempt. Nothing wrong without firebug but export still does not trigger.

Going to "mysites" test drive with regular admin login, then "tableau de bord" shows the Error 500 immediately using firebug. The response tab could be made lighter using the filter to ask only for one line (ie Etat = Rendez-vous demand?). I went to look to this tab but can't figure out something wrong. I also tried to suppress filters or advanced filters or export/import or pdf icons in the list view .. also tried "big select" but firebug always shows off the error 500.
 
its the calc in the element 'link_pro_decision' which is producing the error - you can test that by unpublishing it, If its not set to show in the list then I would suggest setting the 'Only Calc on Save' option to 'yes'
 
Indeed. How did you find it ? Was it visible on the "response tab" under firebug ? This element build an autologin link which is sent by email. So, yes, you're right, it HAS to be calc on save only. Thanks for pointing this. However, I don't see the reason why it's producing an error....

BTW, I still experiment the random problem of CSV not triggering from time to time. This morning I have a new one. I built a more complex filtered table (between two dates see capture2), the list shows up ok (you can see it partially on the screenshot) : 799 records. But I got a popup "no records available for export".... I click "ok" and change the number of lines displayed in the list, it refresh the page and.... it shows an empty list !
 

Attachments

  • Capture.JPG
    Capture.JPG
    39.2 KB · Views: 442
  • Capture2.JPG
    Capture2.JPG
    39.7 KB · Views: 390
Indeed. How did you find it ?
I made a note of the published elements, then I unpublish all of them, then one by one I re-published the elements until the error occurs, then you know the error is with that element
I can't actually remember why it was causing an error - I think it was trying to access something that wasn't available in the list view.

The empty list issue after export is a known issue, I haven't had time to resolve it yet though. Not sure about the specific export issue you had though, which list is this on?
 
Thanks for the explanation. I'll keep in mind for the next time ! :)

The list behind "Tableau de bord" (first post) is "tdb_Responsables" (37) and I'm using the advanced search setup as per "capture2.jpg" of my last post.
 
Rob,

Following your advice, I've unpublished all elements except 2 : id and date. I still have the error when using advanced filter on date (see screenshots). As it says that it has an unexpected character on first position ("3"), I imagine that it is not interpreting the format part of the date element in the advanced filter code. Actually, the french format put the day in the first position (31) where as the usual US format shows the month in the first position (0 or 1). See also the third Screenshot.So, if I erase the format (reverse to default upon saving), it works.
 

Attachments

  • Capture error 500.JPG
    Capture error 500.JPG
    33.3 KB · Views: 384
  • Capture filter.JPG
    Capture filter.JPG
    33.6 KB · Views: 450
  • Capture formating.JPG
    Capture formating.JPG
    27.7 KB · Views: 435
Rob, don't you forget something ? I just made a simple test using advance filtering (date de la demande GREATER THAN "date"). If you select 12/12/2013 : perfect. It you select 13/12/2013 (french format : d/m/y), it shows the date_construct error. Same using the js popup calendar or keying inside the field. But if I enter "12/13/2013" (us format : m/d/y) in the field, no errors (but not exactly the right dates).

Also using the navigation links at the bottom (to reach the end of the filtered list for example) breaks the filtering (1200 records instead of 298).

Should I re-install from github ?
 
did you clear your browser cache? You should see that when the advanced search is submitted the date values will be converted into the standard yyy-mm-dd hh:mm:ss format
 
I changed FF and used Chrome to check, purge cache and cookies and ... yes, indeed, it builds the right syntax.... the first time. This is because in my test, I'm calling back the filter to add a condition. That's the point where it fails. I made a short video : http://screencast.com/t/KwkUWnunnLQJ

However if the filter is build successfully then, using the navigations links to display following pages, breaks the filter (previous post) and from time to time, if going further the filtered page number max, shows up the error :

DateTime::__construct(): Failed to parse time string ((2014-01-12 23:00:00)) at position 0 ((): Unexpected character

It seems that the build date is surrounded by parenthesis, thus the error message ?
 
Hi Rob,

Indeed. I made a fresh whole update from the very last githup master zip and all my tests went well. I'll do some deeper tests this week-end, republishing all the columns. Exports seems ok also. However the navigation problem is still there. When you click on "Fin" (end) to show the last page of the filtered list, it's displayed it but together with a wrong total and additional links to reach back all the list (beyond the "last" page). Not as critical as the date filtering error as it does not seem to alter the export feature but disturbing ... :)
 
Actually, I've published back all the elements and now navigation links work perfectly ! Not clear to me but fine.

I'm now facing the same message as per another post where export function say that there are no records to export. Doing some tests, it seems to appear only when you set an advanced filtering on a dropdown element (basic one or DBjoin one).

On my test drive, if you do complex advanced filtering on dates for example, everything work including export. But if you do a single filtering on "type de RDV" - "EGAL" - "Collectif" (2 choices dropdown), the filtering works as expected but the export display a message saying "empty list".

Something is preventing the export to catch the right data ?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top