Stream: troubleshooting

Topic: Installing metadata block - it's not showing up


view this post on Zulip Bethany Seeger (Oct 15 2025 at 14:51):

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!

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 14:52):

Huh. Do you have to restart Payara?

view this post on Zulip Bethany Seeger (Oct 15 2025 at 14:53):

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.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 14:54):

Any errors in server.log?

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 14:54):

It's strange that you see it in the API but not the UI. :thinking:

view this post on Zulip Bethany Seeger (Oct 15 2025 at 14:55):

none that I could find. I will look again.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 14:59):

It works fine in staging, I assume.

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:05):

yeah, staging and test worked fine.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:05):

What's different in prod? :thinking:

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:16):

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?

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:27):

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.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:28):

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

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:29):

And allMetadataBlocks is defined here: https://github.com/IQSS/dataverse/blob/v5.14/src/main/java/edu/harvard/iq/dataverse/DataversePage.java#L968

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:29):

If that was erroring out, where would the errors go?

I'll look through those to see if something stands out for this block.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:30):

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:

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:31):

Hmmm... no, sadly not. I'll poke around and see if anything stands out.

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:31):

Thank you for all the links.

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:34):

One thing of note -- the metadata block has an ownerID in prod, but not staging.

image.png

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:40):

Do you see the block on dataverse/collection 5?

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:44):

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?

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:46):

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?

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:50):

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.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:50):

So yeah, that 5 is in the database because you have a matching dataverseAlias (ISPS) in the tsv.

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:51):

Do you think if I take out the dataverseAlias and reload the block, that will fix it? Is it as simple as that? :)

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:51):

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

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:51):

If we have any documentation on this, I can't find it. :sweat_smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:52):

It's worth a shot! But judging from the code you might need to remove that 5 manually.

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:52):

It's here and we missed it: https://guides.dataverse.org/en/latest/admin/metadatacustomization.html#metadatablock-properties

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:53):

Ah, thanks. Yes, those are the docs I couldn't find. Phew! :smile:

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 15:53):

"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!

view this post on Zulip Bethany Seeger (Oct 15 2025 at 15:53):

Thank you for all your help with this! I'll report back how it goes in changing it.

view this post on Zulip Philip Durbin ๐Ÿš€ (Oct 15 2025 at 16:12):

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

view this post on Zulip Bethany Seeger (Oct 15 2025 at 16:18):

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