Resource template - unwanted fields inherited from Base Resource

I created a very simple resource template that contains only three fields. This is for a specific internal use case where data would be entered by non-specialist staff, and we would not harvest to DPLA.

When I attempt to create a new item using my new resource template, my three desired fields display as the first three fields, but then the full set of Base Resource fields are shown beneath.

Is this expected behavior for all resource templates to inherit all Base Resource fields? Is it possible to exclude Base Resource fields from a resource template? Thanks.

Would you be willing to export your template so we can see if we can duplicate the issue?

Sure, thank you for looking into this. It looks like the export does only contain the three expected fields.

{
    "o:label": "General Collections Digital Resource",
    "o:resource_template_property": [
        {
            "o:alternate_label": null,
            "o:alternate_comment": null,
            "o:is_required": true,
            "o:is_private": false,
            "data_type_name": "literal",
            "data_type_label": "Text",
            "vocabulary_namespace_uri": "http:\/\/purl.org\/dc\/terms\/",
            "vocabulary_label": "Dublin Core",
            "local_name": "title",
            "label": "Title"
        },
        {
            "o:alternate_label": null,
            "o:alternate_comment": "ARK identifier. Example: ark:\/86086\/n2k64jgq",
            "o:is_required": true,
            "o:is_private": false,
            "data_type_name": "literal",
            "data_type_label": "Text",
            "vocabulary_namespace_uri": "http:\/\/purl.org\/dc\/terms\/",
            "vocabulary_label": "Dublin Core",
            "local_name": "identifier",
            "label": "Identifier"
        },
        {
            "o:alternate_label": null,
            "o:alternate_comment": null,
            "o:is_required": true,
            "o:is_private": false,
            "data_type_name": "customvocab:1",
            "data_type_label": "Access Rights Values",
            "vocabulary_namespace_uri": "http:\/\/purl.org\/dc\/terms\/",
            "vocabulary_label": "Dublin Core",
            "local_name": "accessRights",
            "label": "Access Rights"
        }
    ]
}

Here is what I see when attempting to create a new item using this template:

If you share the exported file, we can import it and see if the problem happens in our own installations.

Have you tried disabling some of your modules and seeing if the issue persists?

What is the best way to share the file? I pasted the JSON in my first reply, but it looked like I can only attach files with extensions jpg, jpeg, png, gif, jp2.

Are there modules in particular you would recommend disabling first or that would be likely suspects for causing this issue?

I haven’t seen this behavior before, so I’m not sure which module specifically might be causing it.
One course of action is to turn off all your modules; if this fixes the issue, then try turning on each module one at a time (and only one on at a time) in order to figure out which one is causing things to break.

I deactivated all modules, but this did not fix the issue.

I was able to replicate the issue in a fresh install of 2.1.2, with no modules, by importing the exported resource template.

What would you recommend as next steps? Is there a place to file a bug report?

I suspect you’ve set “Base Resource” as your default resource template in user settings. This means that any item you add will include “Base Resource” properties by default. So when you select the “General Collections Digital Resource” template, the form pushes “Title”, “Identifier”, and “Access Rights” to the top and leaves the “Base Resource” properties below. This is expected. I recommend that you do not select a default template.

Okay, that makes sense! De-selecting a default template solved this issue.

Not sure if this is related but it looks similar so i’ll ask here:

When i switch between resource templates (the form is still empty as i have just clicked on “add item”) fields from the different resource templates keep populating the form. I would expect the form to be entirely replaced with the newly selected resource template (unless information has already been input maybe).

Additionally, the class gets populated with the default value of the first template i select and is not updated if i change to another template.

Is this the expected behavior?

I can reproduce this on the sandbox (v2.0.2) as well as my own instance (v2.1.2).

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.