Thanks.
I've done the rebuild, and scheduled tasks (via /index.php/scheduled_tasks) and this hasn't helped. I will go through those queries again...
Edit - I see the scheduled_tasks didn't run properly, and I am getting an error when I try to run them.
And my server status says: Errors in work queue - There are errors in the work_queue table which need to be checked and fixed.
Running cache_builder
Last run at 2019-12-11 19:19:05
termlists_terms
# records affected
Total 6
Delete(s) 0
update(s) 6
insert(s) 0
taxa_taxon_lists
There was an SQL error: ERROR: syntax error at or near "WHERE" LINE 30: WHERE cttl.id=u.taxa_taxon_list_id ^ - UPDATE cache_taxa_taxon_lists u SET family_taxa_taxon_list_id=cttlf.id, family_taxon=cttlf.taxon, order_taxa_taxon_list_id=cttlo.id, order_taxon=cttlo.taxon, kingdom_taxa_taxon_list_id=cttlk.id, kingdom_taxon=cttlk.taxon FROM master_list_paths mlp JOIN descendants nu ON nu.id=mlp.id LEFT JOIN cache_taxa_taxon_lists cttlf ON cttlf.taxon_meaning_id=ANY(mlp.path) and cttlf.taxon_rank='Family' AND cttlf.taxon_list_id=0 AND cttlf.preferred=true AND cttlf.allow_data_entry=true LEFT JOIN cache_taxa_taxon_lists cttlo ON cttlo.taxon_meaning_id=ANY(mlp.path) and cttlo.taxon_rank='Order' AND cttlo.taxon_list_id=0 AND cttlo.preferred=true AND cttlo.allow_data_entry=true LEFT JOIN cache_taxa_taxon_lists cttlk ON cttlk.taxon_meaning_id=ANY(mlp.path) and cttlk.taxon_rank='Kingdom' AND cttlk.taxon_list_id=0 AND cttlk.preferred=true AND cttlk.allow_data_entry=true WHERE mlp.external_key=u.external_key AND (COALESCE(u.family_taxa_taxon_list_id, 0)<>COALESCE(cttlf.id, 0) OR COALESCE(u.family_taxon, '')<>COALESCE(cttlf.taxon, '') OR COALESCE(u.order_taxa_taxon_list_id, 0)<>COALESCE(cttlo.id, 0) OR COALESCE(u.order_taxon, '')<>COALESCE(cttlo.taxon, '') OR COALESCE(u.kingdom_taxa_taxon_list_id, 0)<>COALESCE(cttlk.id, 0) OR COALESCE(u.kingdom_taxon, '')<>COALESCE(cttlk.taxon, '') ); UPDATE cache_occurrences_functional u SET family_taxa_taxon_list_id=cttl.family_taxa_taxon_list_id, taxon_path=mlp.path FROM cache_taxa_taxon_lists cttl -- Ensure only changed taxon concepts are updated JOIN descendants nu ON nu.id=cttl.preferred_taxa_taxon_list_id JOIN master_list_paths mlp ON mlp.external_key=cttl.external_key; WHERE cttl.id=u.taxa_taxon_list_id AND (COALESCE(u.family_taxa_taxon_list_id, 0)<>COALESCE(cttl.family_taxa_taxon_list_id, 0) OR COALESCE(u.taxon_path, ARRAY[]::integer[])<>COALESCE(mlp.path, ARRAY[]::integer[]));
Unable to Complete Request
You can go to the home page or try again.
# records affected
Total 27
Delete(s) 9
update(s) 7
insert(s) 0
final update(s) for setup 0
final update(s) for Taxon paths 0
So, I emptied the work_queue table and tried to run the scheduled tasks again, thinking I should do that first. But the SQL error prevents it from completing.