These are chat archives for collectiveaccess/support

16th
May 2016
mrjayviper
@mrjayviper
May 16 2016 05:58
trying to delete a sub-element (parent container => sub-container => sub-element) and it seems timing out. All I get it a black screen. Any ideas for a fix or perhaps a workaround (e.g. deleting a MySQL table record)? thanks
ericwm
@eriwm
May 16 2016 08:22
Good Day Stefan, Over the weekend I cleaned out my providence directory and did a providence develop re-install. I imported the database I was using in 1.6 which has all my mappings already installed. Tried importing some lists and I no longer get the error message I posted earlier but clicking on Execute Import still results in no activity. Usually clicking here takes you to a screen where you are asked to confirm the import. I don't get there and there is nothing showing in the log.
Kehan Harman
@kehh
May 16 2016 08:32
@eriwm I just loaded your mapping and ran the import of the data, and didn't have any issues. What are you using to run php? apache mod_php or php fpm? Also try caUtils import-data -s ~/yourpathtothedirectorywherethespreadsheetis/New-Object-Types.xlsx -m my_categories -f XLSX
CollectiveAccess
@collectiveaccess
May 16 2016 10:37
@mrjayviper how was this sub-element created?
ericwm
@eriwm
May 16 2016 11:02
Hi Kehan, I am using mod_php I will try caUtils and get back to you.
ericwm
@eriwm
May 16 2016 12:50
Hi again, if I go to /support/bin and run anything starting with caUtils import_data I get caUtils command not found. Am i using the wrong syntax??
CollectiveAccess
@collectiveaccess
May 16 2016 12:50
try ./caUtils import-data
does that work?
ericwm
@eriwm
May 16 2016 12:53
Yes but I have an error in my directory path to the xlxs file, I will fix and see what happens -Thanks
ericwm
@eriwm
May 16 2016 13:15
I have put both the mapping and data files in the providence develop directory but when I run the caUtils command it exits with an error saying that the mapping file does not exist. I have checked for spelling errors etc. but I can't see any mistakes. It does not say that the data file does not exist!!
Stefan
@stefankeidel
May 16 2016 13:16
You have to put the right mapping code in the -m parameter
Kehans example above has my_categories ... put whatever code your mapping uses there
(you have to load the mapping before you can use it in export-data, obviously)
The mapping code is a setting you should have defined in your import mapping, near the bottom
ericwm
@eriwm
May 16 2016 13:18
I have used the same mapping code that I used when I was using the GUI importer
ericwm
@eriwm
May 16 2016 14:15
Ok Stefan, I cleaned out everything from my mapping uploads and just imported the mapping.xlsx that I want to use using the Import Data GUI . It appears in /workspace but when I run the caUtils import-data it still says that the mapping file was not found. Does this command automatically go and look for the mapping file or must this file (mapping) and the data file have to be in the same directory i.e must I upload my data file to whichever directory the mapping file is in.
Stefan
@stefankeidel
May 16 2016 14:28
When the mapping is loaded it's stashed in the database. The copy in media/<whatever>/workplace is just for future reference if somebody for some reason needs to get hold of the original mapping. And no, the data doesn't have to be in the same directory
What's the exact command you're running and the exact output?
ANd you're using the my_categories mapping you uploaded here a couple of days ago yes?
ericwm
@eriwm
May 16 2016 14:47
Not using the same my_categories but another mapping and data that I used in 1.6 Command -./caUtils import-data -s /var/www/providence-develop/Printed-Document_types.ods -m printed_document_types -f XLSX. Error = Mapping printed_printed_document_types does not exist
Sorry Mapping printed_document_types does not exist
ericwm
@eriwm
May 16 2016 15:31
Hi again, I have got caUtils import-data to start working but think I have something corrupted in my database. I will install a clean one and progress from there.
ericwm
@eriwm
May 16 2016 16:38
Screenshot from 2016-05-16 18:32:12.png
After re-install and trying to import same files I sent to you and using caUtils I get the followig- hope you can see the screen shot
Stefan
@stefankeidel
May 16 2016 17:47
It's ugly but it's just a warning. Did the data import okay?
anacalmeida
@anacalmeida
May 16 2016 17:58
Hello! I am trying to add an object through Collective Access API and I'm having a huge problem adding an image to the object because I can't understand how to do that with Collective Access Documentation.
Please, can someone help me?
Stefan
@stefankeidel
May 16 2016 18:11
You have to add an object representation record and point the "media" intrinsic field to either a local file path (on the server that is) or to a URL. In the second case you have to set allow_fetching_of_media_from_remote_urls to 1 in app.conf
Same question actually came up not too long ago and I put up a gist with an example
That'll create a representation and relate it to object_id 1