Hello,
I've just installed a new custom metadata block on our production server and it's not showing up. I've already tested this in our test/staging environment and am a bit confused as to why it's not showing up in this environment.
I can see it when I query the API:
curl http://localhost:8080/api/metadatablocks | jq
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 585 100 585 0 0 53181 0 --:--:-- --:--:-- --:--:-- 53181
{
"status": "OK",
"data": [
{
"id": 1,
"displayName": "Citation Metadata",
"name": "citation"
},
{
"id": 2,
"displayName": "Geospatial Metadata",
"name": "geospatial"
},
{
"id": 3,
"displayName": "Social Science and Humanities Metadata",
"name": "socialscience"
},
{
"id": 4,
"displayName": "Astronomy and Astrophysics Metadata",
"name": "astrophysics"
},
{
"id": 5,
"displayName": "Life Sciences Metadata",
"name": "biomedical"
},
{
"id": 6,
"displayName": "Journal Metadata",
"name": "journal"
},
{
"id": 7,
"displayName": "ISPS Metadata",
"name": "customISPS"
},
{
"id": 8,
"displayName": "Software Metadata (CodeMeta v2.0)",
"name": "codeMeta20"
}
]
}
It's ID 7 - customISPS - But it's not in our UI:
image.png
What am I missing? Thanks!
Huh. Do you have to restart Payara?
Yes, I did once so it would pick up the properties file - and that was after I installed the tsv file. I installed the codeMeta block at the same time, fyi... that one shows up fine.
Any errors in server.log?
It's strange that you see it in the API but not the UI. :thinking:
none that I could find. I will look again.
It works fine in staging, I assume.
yeah, staging and test worked fine.
What's different in prod? :thinking:
Thinking outloud here.... I don't think there's much different. One thing I did differently was the order I loaded them in (codeMeta and customISPS)... aside from system size, I can't think of other differences.
There are no messages about these blocks in the log (server.log) - is there another spot I should look?
You're using Datavere 5.14, right? Here's where that help text appears: https://github.com/IQSS/dataverse/blob/v5.14/src/main/webapp/dataverse.xhtml#L282
dataverse.metadataElements.tip=Choose the metadata fields to use in dataset templates and when adding a dataset to this dataverse.
It looks like it's looping over blocks with this:
<ui:repeat value="#{DataversePage.allMetadataBlocks}" var="mdb">
https://github.com/IQSS/dataverse/blob/v5.14/src/main/webapp/dataverse.xhtml#L303
And allMetadataBlocks is defined here: https://github.com/IQSS/dataverse/blob/v5.14/src/main/java/edu/harvard/iq/dataverse/DataversePage.java#L968
If that was erroring out, where would the errors go?
I'll look through those to see if something stands out for this block.
Do you have the ability to add some println debugging, recompile the war file, and redeploy? That's all I can think at the moment. :thinking:
Hmmm... no, sadly not. I'll poke around and see if anything stands out.
Thank you for all the links.
One thing of note -- the metadata block has an ownerID in prod, but not staging.
Do you see the block on dataverse/collection 5?
Oh wow - yeah, it's showing up there.... what did I do to make that happen?
This block is for the whole system, not one setup. But I wonder if some sort of naming scheme lined up?
The collection with id 5 is named "isps" with identifier "ISPS", and my block has a name of "customISPS" and dataverseAlias of "ISPS".
Did we unknowingly make a link between the block and the collection?
Possibly. It may be a way to hide (in the UI anyway) the metadata block. @Julian Gautier or @Gustavo Durand do you know anything about this?
If you look at https://github.com/IQSS/dataverse/blob/v6.8/scripts/api/data/metadatablocks/geospatial.tsv for example, you'll see that "dataverseAlias" is null. That block is supposed to appear everywhere.
Contrast it with https://github.com/IQSS/dataverse.harvard.edu/blob/96a97bfdfc97773cc58075e54252b4caca3b98e5/metadatablocks/customSAEF.tsv where "dataveseAlias=SAEF". So that block only appears there.
I believe that's how it works.
So yeah, that 5 is in the database because you have a matching dataverseAlias (ISPS) in the tsv.
Do you think if I take out the dataverseAlias and reload the block, that will fix it? Is it as simple as that? :)
Here's where the owner is set when you load the block: https://github.com/IQSS/dataverse/blob/v5.14/src/main/java/edu/harvard/iq/dataverse/api/DatasetFieldServiceApi.java#L390
If we have any documentation on this, I can't find it. :sweat_smile:
It's worth a shot! But judging from the code you might need to remove that 5 manually.
It's here and we missed it: https://guides.dataverse.org/en/latest/admin/metadatacustomization.html#metadatablock-properties
Ah, thanks. Yes, those are the docs I couldn't find. Phew! :smile:
"If specified, this metadata block will be available only to the Dataverse collection designated here by its alias and to children of that Dataverse collection."
Sounds like what you're seeing!
Thank you for all your help with this! I'll report back how it goes in changing it.
Hmm, this is actually a bug in the SPA, which shows all the blocks regardless of if dataverseAlias/owner is specified. I just opened https://github.com/IQSS/dataverse-frontend/issues/873
I just reloaded the block without the alias in the tsv file and that doesn't remove the owner, so I manually removed the owner id from the database. Things look good now.
Last updated: Oct 30 2025 at 06:21 UTC