These are chat archives for collectiveaccess/support

28th
Oct 2018
murchmurch
@murchmurch
Oct 28 2018 20:17

Hi! @collectiveaccess Im trying to Use the placeSplitter in a EXIF import and get the City and Country values from the Image file and create a ca_place object . the Refinery parameters are:
{
"relationshipType":"created",
"placeType":"city",
"placeHierarchy": "dc",
"attributes": {
"name": "^IPTC/City",
"idno": "^IPTC/City"
},
"parents": [
{
"idno": "^IPTC/Country-PrimaryLocationName",
"name": "^IPTC/Country-PrimaryLocationName",
"type": "country"
}
]
}
But when i try to import i get a rather nasty PHP error:

PHP Fatal error: Uncaught Error: Call to a member function getName() on null in /var/www/html/providence17/app/helpers/importHelpers.php:1002\nStack trace:\n#0 /var/www/html/providence17/app/helpers/importHelpers.php(235): caProcessRefineryRelatedMultiple(NULL, Array, Array, 0, Object(KLogger), Object(ExifDataReader), Array, Array, Array)\n#1 /var/www/html/providence17/app/helpers/importHelpers.php(752): caProcessRefineryParents('placeSplitter', 'ca_places', Array, Array, Array, 0, Array)\n#2 /var/www/html/providence17/app/refineries/placeSplitter/placeSplitterRefinery.php(82): caGenericImportSplitter('placeSplitter', 'place', 'ca_places', Object(placeSplitterRefinery), Array, Array, Array, Array, Array)\n#3 /var/www/html/providence17/app/models/ca_data_importers.php(2016): placeSplitterRefinery->refine(Array, Array, Array, Array, Array)\n#4 /var/www/html/providence17/app/lib/ca/BatchProcessor.php(1038): ca_data_importers::importDataFromSource('/var/www/html/p...', '43', Array)\n#5 /var/www/html/providence17/app/lib/ca/BatchMediaImp in /var/www/html/providence17/app/helpers/importHelpers.php on line 1002, referer: http://localhost/providence17/index.php/batch/MediaImport/Index

Any ide what i can be doing wrong?

murchmurch
@murchmurch
Oct 28 2018 20:28
It seems to be ralated to the Parents part. If i remove that part it imports OK
murchmurch
@murchmurch
Oct 28 2018 21:06
Sorry @collectiveaccess I found that there was a fix for this issue in the forum, and i uppghraded to 1.7.3 and it works now. Ignore the above question. sorry to bother you!
murchmurch
@murchmurch
Oct 28 2018 21:55
I have a more general Question: is it possible to detect if the placeSplitter has created a object or not? I would like to use the: dontCreate:1 refinary parameter and everytime the placeSplitter cant match a place i would like to put that information in a text field. Is this possible to do?