Skip to content

Template Deletion Fails Without Messaging When Template is in Use #11789

@ofahimIQSS

Description

@ofahimIQSS

Description:
When attempting to delete a template that has been used to publish a dataset, the deletion silently fails. The frontend and backend both block deletion, but no user-facing message is displayed.

Steps to Reproduce:
Log in to Dataverse.
Create or use an existing template.
Create and publish a dataset using that template.
Return to the template page.
Attempt to delete the template used by the dataset.

Observed Behavior:
Deletion fails on both frontend and backend.
No message or warning is shown to the user.

Expected Behavior:
User should be informed that the template cannot be deleted because it is currently in use by one or more datasets.
A clear error or warning message should be displayed.

Logs / Evidence:
See attached server.log (reproduced on latest develop branch).

Environment: Internal

template-server.log

Branch: develop 6.7.1

Proposed Fix / Suggestion:
Add a check during template deletion to confirm whether the template is in use.

If in use, block deletion and display a clear message:
“This template cannot be deleted because it is being used by published datasets.”

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions