Topic: Some issues
Hi there,
I think I need your help. I installed the latest indidicia warehouse and an indicia website on Drupal 7 with features installed running local on xampp. But I keep having some issues:
I would like to have a my records page, since there is no feature for this in drupal 7 I stumbled on a topic here.
Hi Steve
For question 1, would the iRecord style My Records suit your purpose? If so, then you need to create a Dynamic Report Explorer page, and specify the following under User Interface > Form configuration:[standard_params] @allowSave=true @linkToMapDiv=map @taxon_list_id=15 @filter-my_records=1 @indexedLocationTypeIds=[15,1370] @otherLocationTypeIds=[2412,2188] [map] @dataSource=library/occurrences/filterable_explore_list_mapping @dataSourceLoRes=library/occurrences/filterable_explore_list_mapping_lores =Records= [report_grid] @dataSource=library/occurrences/filterable_explore_list @rowId=occurrence_id @downloadLink=true =Species= [report_grid] @id=species @dataSource=library/taxa/filterable_explore_list @downloadLink=true @rowId=taxon_meaning_id @linkFilterToMap=false =Taxon groups= [report_grid] @id=taxon_groups @dataSource=library/taxon_groups/filterable_explore_list @downloadLink=true @rowId=taxon_group_id @linkFilterToMap=false =Families= <p>This report shows a breakdown of the species and record counts by taxonomic family.</p> [report_grid] @id=families @dataSource=library/taxa/filterable_explore_list_taxonomy_breakdown @downloadLink=true @linkFilterToMap=false =Photos= [report_grid] @id=photos @dataSource=library/occurrence_images/filterable_explore_list @rowId=occurrence_id @includeAllColumns=false @headers=false @galleryColCount=4 @itemsPerPage=16
Under the report settings, preset parameters specify the following:
smpattrs= occattrs= default_input_form=enter-record-list my_records=1
You'll of course need to tweak map and other settings to your liking but hopefully that will get you started.
If you need to remove a column from the first records grid for example, then under Report Settings > Columns Configuration List, click Add Columns List to Column Configuration List (this adds a container for a list of column definitions that will control behaviour of the first grid on the page). Now, add columns to this list and for each, add the fieldname property and set it to the fieldname output by the report, and add the visible checkbox property and leave it unchecked.
If you want to add your own custom attribute columns to the report, then specify the attribute IDs under the smpattrs and occattrs as a comma separated list, in the preset parameters setting as described above.
2. When you expose your records to verification in iRecord, they will only appear on the verification screens which only verifiers can see, not all users. Each verifier has a taxonomic and geographic filter as appropriate, so they will only see the records which suit their expertise.
Best wishes
John
When I enter the code like it is there and save the page I got following error and a blank report.
Notice: Undefined variable: cookieParams in report_helper::get_report_grid_current_param_values() (line 2238 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Warning: array_diff_key(): Argument #1 is not an array in report_helper::get_report_grid_current_param_values() (line 2238 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Warning: array_merge(): Argument #1 is not an array in report_helper::get_report_grid_current_param_values() (line 2242 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Warning: Invalid argument supplied for foreach() in report_helper::get_report_grid_current_param_values() (line 2255 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Notice: Undefined variable: cookieParams in report_helper::get_report_grid_current_param_values() (line 2238 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Warning: array_diff_key(): Argument #1 is not an array in report_helper::get_report_grid_current_param_values() (line 2238 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Warning: array_merge(): Argument #1 is not an array in report_helper::get_report_grid_current_param_values() (line 2242 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Warning: Invalid argument supplied for foreach() in report_helper::get_report_grid_current_param_values() (line 2255 of C:\xampp\htdocs\instant\sites\all\modules\iform\client_helpers\report_helper.php).
Also, I'm unable to upload images when entering data. I got following error:
There was an SQL error: ERROR: insert or update on table "occurrence_media" violates foreign key constraint "fk_occurrence_media_type" DETAIL: Key (media_type_id)=(0) is not present in table "termlists_terms". - INSERT INTO "occurrence_media" ("created_on", "created_by_id", "updated_on", "updated_by_id", "caption", "media_type_id", "path", "occurrence_id") VALUES ('20141104 11:13:49', 1, '20141104 11:13:49', 1, NULL, 0, 'o_195t4n89v1ek51ic7981g2p148a5.jpg', 11)
[occurrence_medium:general]
An error occurred
There was an SQL error: ERROR: current transaction is aborted, commands ignored until end of transaction block - insert into cache_occurrences ( id, record_status, release_status, downloaded_flag, zero_abundance, website_id, survey_id, sample_id, survey_title, date_start, date_end, date_type, public_entered_sref, entered_sref_system, public_geom, sample_method, taxa_taxon_list_id, preferred_taxa_taxon_list_id, taxonomic_sort_order, taxon, authority, preferred_taxon, preferred_authority, default_common_name, search_name, taxa_taxon_list_external_key, taxon_meaning_id, taxon_group_id, taxon_group, created_by_id, cache_created_on, cache_updated_on, certainty, location_name, recorders, verifier, verified_on, images, training, location_id, input_form, sensitivity_precision ) select distinct on (o.id) o.id, o.record_status, o.release_status, o.downloaded_flag, o.zero_abundance, su.website_id as website_id, su.id as survey_id, s.id as sample_id, su.title as survey_title, s.date_start, s.date_end, s.date_type, case when o.confidential=true or o.sensitivity_precision is not null then null else case when s.entered_sref_system = '4326' and coalesce(s.entered_sref, l.centroid_sref) ~ '^-?[0-9]*\.[0-9]*,[ ]*-?[0-9]*\.[0-9]*' then abs(round(((string_to_array(coalesce(s.entered_sref, l.centroid_sref), ','))[1])::numeric, 3))::varchar || case when ((string_to_array(coalesce(s.entered_sref, l.centroid_sref), ','))[1])::float>0 then 'N' else 'S' end || ', ' || abs(round(((string_to_array(coalesce(s.entered_sref, l.centroid_sref), ','))[2])::numeric, 3))::varchar || case when ((string_to_array(coalesce(s.entered_sref, l.centroid_sref), ','))[2])::float>0 then 'E' else 'W' end when s.entered_sref_system = '4326' and coalesce(s.entered_sref, l.centroid_sref) ~ '^-?[0-9]*\.[0-9]*[NS](, |[, ])*-?[0-9]*\.[0-9]*[EW]' then abs(round(((regexp_split_to_array(coalesce(s.entered_sref, l.centroid_sref), '([NS](, |[, ]))|[EW]'))[1])::numeric, 3))::varchar || case when coalesce(s.entered_sref, l.centroid_sref) like '%N%' then 'N' else 'S' end || ', ' || abs(round(((regexp_split_to_array(coalesce(s.entered_sref, l.centroid_sref), '([NS](, |[, ]))|[EW]'))[2])::numeric, 3))::varchar || case when coalesce(s.entered_sref, l.centroid_sref) like '%E%' then 'E' else 'W' end else coalesce(s.entered_sref, l.centroid_sref) end end as public_entered_sref, case when s.entered_sref_system is null then l.centroid_sref_system else s.entered_sref_system end as entered_sref_system, reduce_precision(coalesce(s.geom, l.centroid_geom), o.confidential, o.sensitivity_precision, case when s.entered_sref_system is null then l.centroid_sref_system else s.entered_sref_system end) as public_geom, tmethod.term as sample_method, cttl.id as taxa_taxon_list_id, cttl.preferred_taxa_taxon_list_id, cttl.taxonomic_sort_order, cttl.taxon, cttl.authority, cttl.preferred_taxon, cttl.preferred_authority, cttl.default_common_name, cttl.search_name, cttl.external_key as taxa_taxon_list_external_key, cttl.taxon_meaning_id, cttl.taxon_group_id, cttl.taxon_group, o.created_by_id, now(), now(), case when certainty.sort_order is null then null when certainty.sort_order <100 then 'C' when certainty.sort_order <200 then 'L' else 'U' end, case when o.confidential=true or o.sensitivity_precision is not null then null else coalesce(l.name, s.location_name) end, s.recorder_names, pv.surname || ', ' || pv.first_name, o.verified_on, images.list, o.training, s.location_id, s.input_form, o.sensitivity_precision from occurrences o left join cache_occurrences co on co.id=o.id join samples s on s.id=o.sample_id left join locations l on l.id=s.location_id and l.deleted=false join surveys su on su.id=s.survey_id left join cache_termlists_terms tmethod on tmethod.id=s.sample_method_id join cache_taxa_taxon_lists cttl on cttl.id=o.taxa_taxon_list_id left join (occurrence_attribute_values oav join termlists_terms certainty on certainty.id=oav.int_value join occurrence_attributes oa on oa.id=oav.occurrence_attribute_id and oa.deleted='f' and oa.system_function='certainty' ) on oav.occurrence_id=o.id and oav.deleted='f' left join users uv on uv.id=o.verified_by_id and uv.deleted=false left join people pv on pv.id=uv.person_id and pv.deleted=false left join (select occurrence_id, array_to_string(array_agg(path), ',') as list from occurrence_media where deleted=false group by occurrence_id) as images on images.occurrence_id=o.id where co.id is null and o.id in (11)
[sample:general]
Thanks in advance
Dieter