Skip to content

[Port to dtq-dev] Issue 1406: normalize metadatavalue.text_lang = '*' to NULL - #1412

Open
kosarko wants to merge 1 commit into
dataquest-dev:dtq-devfrom
ufal:backport-1407-to-dtq-dev
Open

[Port to dtq-dev] Issue 1406: normalize metadatavalue.text_lang = '*' to NULL#1412
kosarko wants to merge 1 commit into
dataquest-dev:dtq-devfrom
ufal:backport-1407-to-dtq-dev

Conversation

@kosarko

@kosarko kosarko commented Aug 12, 2026

Copy link
Copy Markdown

Port of ufal#1407 by @kosarko to dtq-dev.

Rows written before the 7.6.5 upgrade carry text_lang = '*' (Item.ANY).
MetadataValue.setLanguage() normalizes '*' -> NULL since 7.6.5, so no new
rows can be created, but nothing repaired the existing ones: the setter only
runs on row creation.

Stale '*' rows break the metadata-export -> metadata-import round trip (the
export emits [*] headers the import rejects, #1402) and make OAI store
<element name="*"/>, from which oai_openaire emits an invalid xml:lang="*".

The migration bumps item.last_modified on the affected items before
normalizing. That is what makes the reindex happen without a forced full
rebuild: 'dspace oai import' and 'dspace index-discovery' both select items by
last_modified, so the existing cron runs pick up exactly the touched items.

Only '*' is normalized; empty-string languages are legal and round-trip
correctly.

(cherry picked from commit 442fae6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant