Skip to content

Cannot create 'Collection Relationship' view definition if an Invertebrates collection is in the database #7680

@grantfitzsimmons

Description

@grantfitzsimmons

Describe the bug
If an Invertebrates discipline is present, the user will receive this error when trying to create a new 'Collection Relationship' view definition:

no viewdef: CollectionRelLeft for definition of viewdef: CollectionRelationship Table

It means that in the form definitions for the discipline (looking at both the default and custom definitions), there is a <viewdef name="CollectionRelationship Table"> which has a <definition>CollectionRelLeft</definition>, but there is no <viewdef name="CollectionRelLeft"> in your <viewdefs> section.

The error only occurs for collections whose viewset XML is missing the required viewdef (here, CollectionRelLeft), which will happen regardless of the custom form definition if a discipline in the database is invertebrates. That's because

Why does it work for other collections?

  • The error only appears when the chain of references is broken (i.e., a referenced viewdef is missing).

Summary:
This error is due to a missing <viewdef name="CollectionRelLeft"> in your invertebrate.views.xml. Add it (and any other referenced viewdefs) to resolve the 404.

Steps to recreate:

  1. Log into a database with an 'Invertebrates' discipline
  2. Go to any form definition
  3. Go to 'Collection Relationship' and try to create a new view definition
  4. See error:
    no viewdef: CollectionRelLeft for definition of viewdef: CollectionRelationship Table
    

Reported By
Museum für Naturkunde Berlin on the Speciforum

Additional context
This would happen in any case where there is a missing definition that is called for in a viewdef (default or otherwise).

Metadata

Metadata

Assignees

No one assigned

    Labels

    2 - FormsIssues that are related to the form system

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions