Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mixed_text metadata fields without collection #232

Conversation

KatrinIhler
Copy link
Member

@KatrinIhler KatrinIhler commented Dec 14, 2023

We have disabled the listproviders for some mixed_text fields in the episode and series metadata for performance reasons, meaning that those fields don't have a collection, which is a valid config for the old Admin UI. However, this currently breaks the new one:
image

Simply checking if field.collection is defined before checking its length should fix this.

Warning: I didn't test this because I didn't want to deal with figuring out how to do this against my local Opencast instance. But this is simple enough, so it should be fine...right?

Edit: I'm also unsure which branch to point this at to get it into Opencast as soon as possible, maybe you can advise me on that?

@KatrinIhler KatrinIhler added the type:bug Something isn't working label Dec 14, 2023
@Arnei
Copy link
Member

Arnei commented Dec 15, 2023

Could you share what config(s) you used to trigger the error?

Are the performance issues caused by the new admin ui? Want to open an issue for that?

Edit: I'm also unsure which branch to point this at to get it into Opencast as soon as possible, maybe you can advise me on that?

You chose the correct branch. There is also no fixed release schedule atm, you can basically cut a release whenever.

@KatrinIhler
Copy link
Member Author

Could you share what config(s) you used to trigger the error?

Sure! Just comment out the listprovider for at least one field with type mixed_text in either org.opencastproject.ui.metadata.CatalogUIAdapterFactory-episode-common.cfg or org.opencastproject.ui.metadata.CatalogUIAdapterFactory-series-common.cfg to trigger the error for events and series details respectively. Example:

# Presenters
property.presenters.inputID=creator
property.presenters.label=EVENTS.EVENTS.DETAILS.METADATA.PRESENTERS
property.presenters.type=mixed_text
property.presenters.readOnly=false
property.presenters.required=false
# property.presenters.listprovider=CONTRIBUTORS
property.presenters.order=7

Are the performance issues caused by the new admin ui? Want to open an issue for that?

Nope, that's Opencast's fault, and it's a known problem with requesting all users.

@KatrinIhler
Copy link
Member Author

Oh, and I also just realized I didn't describe the error correctly: If you open either series or event details, the whole Admin UI turns white. :D

Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me and works. Below is a suggestion that should be functionally equivalent, but less code :D

…tadataTab.tsx

Co-authored-by: Arne Wilken <Arnei@users.noreply.github.com>
@Arnei
Copy link
Member

Arnei commented Dec 18, 2023

Actually wait a sec, the same error occurs in NewMetadataPage.tsx (line 44). Other Metadata related tsx files seems to be fine.

@KatrinIhler
Copy link
Member Author

Actually wait a sec, the same error occurs in NewMetadataPage.tsx (line 44). Other Metadata related tsx files seems to be fine.

Good catch. Actually affects the extended metadata as well. But now I think I got everything. :D Again: I didn't test this, especially with the new syntax using ?.

@Arnei Arnei merged commit e9ea611 into opencast:admin-ui-picard Dec 19, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants