These are chat archives for collectiveaccess/support

7th
Feb 2016
alberg214
@alberg214
Feb 07 2016 21:59
Anybody home?
CollectiveAccess
@collectiveaccess
Feb 07 2016 21:59
unfortunately yes :-)
Stefan
@stefankeidel
Feb 07 2016 21:59
Define "home"
alberg214
@alberg214
Feb 07 2016 22:00
virtual home, I guess
quick question - i have a bunch of media named like 123.jpg etc and there are items with matching object ids in my database
when i use import to bring them in en masse, it don't work - all of the media get attached to the first item instead of the proper items
and it says that it is parsing the file names as page numbers
any idea of what i am doing wrong?
CollectiveAccess
@collectiveaccess
Feb 07 2016 22:15
What do the identifiers on the objects look like?
It's going to match on identifier, not object_id
alberg214
@alberg214
Feb 07 2016 22:16
The identifiers are also numbers so 555.jpg should go with object id 555 (the id I assign, not the system generated one)
if i am understanding how this works
CollectiveAccess
@collectiveaccess
Feb 07 2016 22:17
Yes, the field is called "idno"
What is the idno for the object they all get attached to?
alberg214
@alberg214
Feb 07 2016 22:18
1
will run an import now and get the exact message
CollectiveAccess
@collectiveaccess
Feb 07 2016 22:20
Did you modify the regular expressions that do the identifier matching in app.conf?
alberg214
@alberg214
Feb 07 2016 22:21
no... let me take a look at that file
oh... see it now... so I need to write a regex (ugh) to describe the file names?
i had thought that specifying "match on file name without extension" would do this for me
alberg214
@alberg214
Feb 07 2016 22:29
i see the regexes for the choices on the media import menu - tried commenting out the first 2 and it fell through to the "match on file name without extension" but still matched 555.jpg to object id 10
i would think that 555 would match to object id 555 rather than 10
alberg214
@alberg214
Feb 07 2016 22:44
renamed the file from 555.jpg to 555 and get this message on import:
On the Hillside, West Hoboken, N.J.: Matched media 555 from wtm_images/temp to object using expression "Filename with page number - page number included"
On the Hillside, West Hoboken, N.J. (10): SUCCESS
CollectiveAccess
@collectiveaccess
Feb 07 2016 22:46
Those regular expressions are presets
one of them should work for your file names
where are you running this? Linux or Windows? And what version of PHP?
alberg214
@alberg214
Feb 07 2016 22:48
linux, php 5.4
when i commented out the other presets in app.conf, it said it was matching on the right preset, but to item 10
very srtange
result...
On the Hillside, West Hoboken, N.J.: Matched media 555 from wtm_images/temp to object using expression "Filename without extension"
On the Hillside, West Hoboken, N.J. (10): SUCCESS
CollectiveAccess
@collectiveaccess
Feb 07 2016 22:53
which one worked?
alberg214
@alberg214
Feb 07 2016 22:53
neither
always matches to 10 no matter what
i am running 1.6 if that helps
CollectiveAccess
@collectiveaccess
Feb 07 2016 22:54
Try putting this in you app.conf
in place of the entries that are there
mediaFilenameToObjectIdnoRegexes = {
all_numbers = {
displayName = _(Filename with page number - page number stripped),
regexes = { "^([\d]+).[A-Za-z]+$" }
}
}
This should replace the entire entry for mediaFilenameToObjectIdnoRegexes
alberg214
@alberg214
Feb 07 2016 22:57
555.jpg: Skipped 555.jpg from wtm_images/temp because it could not be matched
progress i guess
CollectiveAccess
@collectiveaccess
Feb 07 2016 22:58
I'd have to see this system to know what's going on then
we use the importer all of the time in our own work
so either something is recently broken
or there's something strange going on with your setup
alberg214
@alberg214
Feb 07 2016 22:58
things seem to be working well in all other respects
wait.... it works with a file name of 555 (no extension)
CollectiveAccess
@collectiveaccess
Feb 07 2016 23:00
the regular expression I gave you removes the extension
do you have a local app.conf file?
alberg214
@alberg214
Feb 07 2016 23:01
ahhh
yes
CollectiveAccess
@collectiveaccess
Feb 07 2016 23:01
in app/conf/local ?
alberg214
@alberg214
Feb 07 2016 23:01
hang on
CollectiveAccess
@collectiveaccess
Feb 07 2016 23:01
I have to go in about 90 seconds
and I won't be back until tomorrow morning at 8.30am
... don't mean to rush you but it's Sunday (!)
alberg214
@alberg214
Feb 07 2016 23:02
i know - ireally appreciate the help - i think you have gotten me to a place where i can fix this
thank you very much!
CollectiveAccess
@collectiveaccess
Feb 07 2016 23:02
ok cool
alberg214
@alberg214
Feb 07 2016 23:02
have a good one
CollectiveAccess
@collectiveaccess
Feb 07 2016 23:02
I'll try to pop back on this evening around 10pm
if you are desperate for help
otherwise tomorrow1
alberg214
@alberg214
Feb 07 2016 23:03
ok - thanks
CollectiveAccess
@collectiveaccess
Feb 07 2016 23:03
happy super bowl to you
alberg214
@alberg214
Feb 07 2016 23:03
and to you