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

Milliner createResource breaks when '_format=jsonld' is not removed #1395

Open
seth-shaw-unlv opened this issue Jan 9, 2020 · 2 comments
Open
Labels
Type: feature request a proposal for a new feature in the software (should be justified by a ‘use case’)
Milestone

Comments

@seth-shaw-unlv
Copy link
Contributor

I happened to be installing the Islandora modules on a Drupal site and forgot to enable the 'Remove jsonld parameter' checkbox @ /admin/config/search/jsonld. When I migrated the islandora tags I saw entries show up in Fedora, so I wasn't concerned. It wasn't until I tried to update them and saw errors pop up in the Karaf log that I discovered something was wrong.

Milliner was creating an empty resource and failing to populate it, so when I went to update the resource it didn't have the 'schema:dateModified' Milliner wanted so it threw a 500 error.

Initially I didn't know why Milliner wasn't populating the Fedora resource record until I threw a bunch of debugging log statements throughout the createResource function. Turn out that, without that 'Remove jsonld parameter' enabled, the processJsonld function always returns an empty array, so Milliner simply PUTS nothing. None of this throws an error at creation time, even though this is obviously a problem.

I know that this used to work so I'm not sure when it broke OR if I did something else quirky to cause this, so if someone could reproduce, that would be nice.

@whikloj
Copy link
Member

whikloj commented Jan 10, 2020

@seth-shaw-unlv
Copy link
Contributor Author

Ah, that is probably the quirky bit in my setup! Crayfish was setup by the playbook but the Drupal site wasn't; causing those two configuration settings to not align properly.

Still, it seems like there should have been some sort of warning, if not an error, pop up in the Milliner log if it tries to PUT an empty JSONLD. We either need to abort the whole resource creation OR ensure that we at least PUT a value for the configured date last modified predicate so that future updates don't crash.

@dannylamb dannylamb added this to the 1.1.0 milestone Jan 29, 2020
@kstapelfeldt kstapelfeldt added Type: feature request a proposal for a new feature in the software (should be justified by a ‘use case’) and removed feature request labels Sep 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: feature request a proposal for a new feature in the software (should be justified by a ‘use case’)
Projects
Development

No branches or pull requests

4 participants