These are chat archives for collectiveaccess/support

21st
Oct 2018
David Andel
@madsurgeon
Oct 21 2018 09:29
Answer to self: I have kind of solved it by opening a custom URL which then runs the system command. A better integrated solution would be nicer of course...
David Andel
@madsurgeon
Oct 21 2018 19:42
Now another question: we need to import media programmatically as representations. For that I have tried countless combinations of options of the command caUtils, like e.g.
sudo -u _www ./support/bin/caUtils import-media -s /Users/david/Sites/providence/import/doodle1/ -u Administrator -it ca_object_representations -iti doodle-2018-1 --representation-idno doodle-2018-1 -t "" --import-mode ALWAYS_MATCH
David Andel
@madsurgeon
Oct 21 2018 19:58
It doesn't matter if I use the options --import-target-idno (-iti) or --representation-idno (-ri) or both like above. The result is always the same. The media get imported, but as independent objects, not as media representations of the object "Doodle1" with the Object identifier "doodle-2018-1".
Also, I have hit a bug here: the short option -ri does not work, only the long option works.
The option -t "" is there because if it's not, the command exists with the error message "Set 1 does not exist".
Also the --import-mode does not change anything about the result.
David Andel
@madsurgeon
Oct 21 2018 20:06
I suspect the problem might be connected to the strange fact that I don't seem to be able to set any Representation identifier even in the web GUI. When I check the "Edit full record - Summary" page of the primary media representation of the object the Representation identifier id greyed out and <not defined>.
How can it be defined?
And how then can media be imported using caUtils as representations of a particular object?