These are chat archives for collectiveaccess/support

18th
Apr 2016
jessica-s
@jessica-s
Apr 18 2016 03:59
Hi, can I ask why there are two similar (but different) entry points for loans in the Providence basic tables? For example, in ca_object_lots I can create New Lot > Loan (or Long term loan); but then I can add similar data into ca_loans: New > Loan > Loan In. We also have a 'Loan In' & 'Loan Out' screen at the object level - but I can't remember now if that was added by @samrahman when he was working on our system or if it was there initially. Can someone explain the reasoning for these various loan entry points? Are you able to give an example as to a scenario where you would create a New Lot > Loan, adding related objects etc, and then how you would use the standalone 'Loans' tab?
Julia
@juliaweist
Apr 18 2016 13:02
Hi @jessica-s it doesn't make a lot of sense. I've removed it from several custom configurations because it confuses people. The thinking was that a long-term loan in the Lots table is essentially a normal accessioned object, just of a different source/class. A Loan in this set up would be a traditional set of objects from a lender, on loan for a temporary purpose, such as an exhibition.
Stefan
@stefankeidel
Apr 18 2016 13:28
@PMassoels can you give me a full example of what you're trying to do? Endpoint, params and the full request body?
also what version are you using?
PMassoels
@PMassoels
Apr 18 2016 15:24
I'm using the latest version (master)

Post body

{
"intrinsic_fields": {
"media": "http:\/\/localhost:8001\/media\/collectiveaccess\/images\/4\/7\/47900_ca_object_representations_media_4743_original.jpg",
"type_id": "142"
},
"related": {
"ca_objects": {
"object_id": "24"
}
}
}

errors atm : array(2) {
'ok' =>
bool(false)
'errors' =>
array(2) {
[0] =>
string(32) "'' does not exist in this object"
[1] =>
string(29) "Related object does not exist"
}
}
And i'm very sure the object is present
legacyartiste
@legacyartiste
Apr 18 2016 16:42
ok
CollectiveAccess
@collectiveaccess
Apr 18 2016 16:43
thanks for moving!
so regarding your Pawtucket instance
is there a URL I can look at?
legacyartiste
@legacyartiste
Apr 18 2016 16:43
i have an issue with pawtucket slideshow not displaying images
i am also interested to configure <slider> for transitions
CollectiveAccess
@collectiveaccess
Apr 18 2016 16:46
It looks like you have some missing files... there are errors on load where many of the javascript files are not found
how did you install this?
or rather, can you make sure all of the files are copied over?
also, are the media representations in your database marked as being available to the public?
I suspect they may be marked private
legacyartiste
@legacyartiste
Apr 18 2016 16:47
i imported the images to coogle compute instance
CollectiveAccess
@collectiveaccess
Apr 18 2016 16:51
Who installed the software itself?
legacyartiste
@legacyartiste
Apr 18 2016 16:53
i did
i am checking permissions on the media directory
CollectiveAccess
@collectiveaccess
Apr 18 2016 16:55
Make sure this directory is complete and accessible: http://cataloguer.robertbutler.us/js
legacyartiste
@legacyartiste
Apr 18 2016 17:04
no such resource in my installation
how would i install it
CollectiveAccess
@collectiveaccess
Apr 18 2016 17:05
It's part of the distribution
it should be there
where'd you get the files?
legacyartiste
@legacyartiste
Apr 18 2016 17:05
github
CollectiveAccess
@collectiveaccess
Apr 18 2016 17:05
ok
Have you considered using Pawtucket2? This is the latest iteration
legacyartiste
@legacyartiste
Apr 18 2016 17:14
is that an answer to the /js issue
i am installing presently and configuring as a unique instance.
CollectiveAccess
@collectiveaccess
Apr 18 2016 17:40
Well a reinstall should help with the missing files
and if you're going to run Pawtucket from GitHub you should use the latest I think
Stefan
@stefankeidel
Apr 18 2016 19:12
@PMassoels I just tried this and it worked:
curl -XPUT 'http://administrator:dublincore@providence.dev/service.php/item/ca_object_representations' -d '{
  "intrinsic_fields": {
    "idno": "foo",
    "type_id": "front",
    "media" : "http://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/DSCN4079-castle_crop_b.jpg/1280px-DSCN4079-castle_crop_b.jpg"
  },
  "related": {
    "ca_objects": [{
      "object_id": 1,
      "is_primary": 1
    }]
  }
}'
You have to have allow_fetching_of_media_from_remote_urls set to 1 in app.conf, obviously. It defaults to 0
In which case you can only pass local file paths (like /home/foo/bar.png)
Looking at your example, I think you missed one level of nesting in the "ca_objects" block. It's possible to relate multiple objects so it has to be a list of JSON objects