1

Topic: Error when downloading report

Hi,
I have a clone (visible to admins only) of my Explore > All Records report on which I have the download option turned on. This allows me to simply filter records for download when asked by various partner organisations.

I have created a filter for butterfly records, in Northern Ireland between 01/01/2013 and 31/12/2013.It excludes Rejected records by default.

When I click 'Download this report' the resulting URL is:

http://warehouse1.indicia.org.uk/index. … ist_names=[object%20Object]&higher_&taxa_taxon_list_list=&taxon_rank_sort_order=&date_type=recorded&date_from=01%2F01%2F2013&date_to=31%2F12%2F2013&date_age=&location_name=&sref=&sref_system=OSIE&location_id=1612&indexed_location_id=&remembered_location_name=Northern%20Ireland

and the error I get is:

{"error":"general_errors.Undefined offset: 1","code":8,"file":"D:\\web sites\\warehouse1\\modules\\indicia_svc_data\\controllers\\services\\report.php","line":161,"trace":[]}

Jim has taken a look and highlighted the following part of the URL as potentially problematic:

&higher_taxa_taxon_list_names=[object%20Object]
&higher_
&taxa_taxon_list_list=

Any ideas?

Thanks,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

2

Re: Error when downloading report

Hi Fiona
The &higher_= entry is causing the issue - for some reason PHP does not see the "_=" at all. I've fixed the server-side so this problem won't occur, though I'm confused as to how this ended up in the filter in the first place. I don't get that happen when I try to recreate it on iRecord.
Best wishes
John

John van Breda
Biodiverse IT

3

Re: Error when downloading report

Hi John,
Thanks. I had simply cloned the Explore All Records page you had created for me a while back and the only thing I changed was to allow download. I've n idea what the difference might be from the iRecord page - would being on a different version of the iform make a difference perhaps?

Anyway, thanks for fixing it.

Cheers,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar

4

Re: Error when downloading report

Hi John

Thanks for looking at this.

It was "&higher_" without an equals sign at all which is why the warehouse objected.

Like you I tried it on iRecord but couldn't see the filter in the download link at all. However, I have now found if I use Firebug to capture the network request then the filter is present.

If there is a problem on the client side it is to do with the species group filter. On iRecord, if I choose the 'insect- butterfly species group, the relevant bit of the url looks like

&taxon_group_list=104
&higher_taxa_taxon_list_names=%5Bobject%20Object%5D
&higher_taxa_taxon_list_list=
&taxa_taxon_list_list=
&taxon_rank_sort_order=

which compares with what Fiona was getting

&taxon_group_list=104
&higher_taxa_taxon_list_names=[object%20Object]
&higher_
&taxa_taxon_list_list=
&taxon_rank_sort_order=

i.e. the higher_taxa_taxon_list_list parameter is malformed.

I've checked the CeDAR site and can repeat the fault and I have checked the jquery.reportgrid.js and see it is slightly out of date. In particular, it is missing r8604 which has a change in the vicinity of the report-download-link.click event.

The behaviour of the site has just changed for me so perhaps you have done some updates, Fiona.

Jim.

5

Re: Error when downloading report

Hi Jim,
no I was out of the office yesterday so haven't done any updates...

I'll look at updating the whole iform module this week or early next week.

Many thanks,
Fiona

Fiona McCrory
CEDaR Website Officer
www.nmni.com/cedar