describo / crate-builder-component

A VueJS UI component to build an RO-Crate
MIT License
6 stars 3 forks source link

Unable to set URL as @id #90

Closed beepsoft closed 5 months ago

beepsoft commented 5 months ago

Using 0.56.0, I tried to add a File to the "Large Crate" example crate in the development app and set the @id to an URL (https://sztaki.hun-ren.hu/themes/sztakitheme/icons/HUN-REN-SZTAKI-logo.png).

It failed with the following error in the console:

image
crate-manager.js:651 Uncaught (in promise) Error: This method does not operate on @id, @type, @reverse, name
    at CrateManager.setProperty (crate-manager.js:651:19)
    at CrateManager.linkEntity (crate-manager.js:846:14)
    at CrateManager.ingestAndLink (crate-manager.js:788:14)
    at createEntity (Shell.component.vue:496:14)
    at saveProperty (Shell.component.vue:567:9)
    at callWithErrorHandling (runtime-core.esm-bundler.js:188:18)
    at callWithAsyncErrorHandling (runtime-core.esm-bundler.js:196:17)
    at emit (runtime-core.esm-bundler.js:708:5)
    at runtime-core.esm-bundler.js:7775:45
    at save (RenderEntityId.component.vue:60:5)

It seems to fails for any element, even if the @id was originally a URL. For example when I tried to change the @id URL of the https://glottolog.org/resource/languoid/id/kaur1273 element in the Larg Crate.

marcolarosa commented 5 months ago

Please test 0.56.1 when you can. I found some other bugs as well.

beepsoft commented 5 months ago

Thanks, it works now. Published 0.56.1 of the react component as well: https://www.npmjs.com/package/@describo/crate-builder-component-react