Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the CollectiveAccess support forum! Here the developers and community answer questions related to use of the software. Please include the following information in every new issue posted here:

  1. Version of the software that is used, along with browser and version

  2. If the issue pertains to Providence, Pawtucket or both

  3. What steps you’ve taken to try to resolve the issue

  4. Screenshots demonstrating the issue

  5. The relevant sections of your installation profile or configuration including the codes and settings defined for your local elements.

If your question pertains to data import or export, please also include:

  1. Data sample

  2. Your mapping

Answers may be delayed for posts that do not include sufficient information.

caUtils import media error

I'm having trouble with the new cmd line media import-- I'm probably entering something wrong or missing something...

I've entered:

php bin/caUtils import-media -s D:/cmdimport/test -u Administrator -l D:/logs/cmdimport/cmd_import_error.txt -d INFO -t 1 -i true -mt CONTAINS -m FILE_NAME --import-mode ALWAYS_MATCH --import-target ca_objects -itt image 

where there's a file 1.jpg to add to an image record with an id of 1.
I get an error :

PHP Fatal error:  Uncaught Error: Call to a member function get() on null in D:\SMA-catalog175\app\lib\ca\Utils\CLIUtils.php:4082
Stack trace:
#0 D:\SMA-catalog175\support\bing\caUtils(166): CLIUtils::import_media(Object(Zend_Console_Getopt))
#1 (main)
   thrown in D:\SMA-catalog175\app\lib\ca\Utils\CLIUtils.php on line 4082


  • Hi Sarahs, May I ask where you got the information about the Import-Media Part of caUtils? Canˋt find any on the caUtils Wiki Page...
  • Nevermind, it’s 

    bin/caUtils import-media help
  • edited September 2017
    You might want to use equal signs I guess?

    So instead of 

    -s D:/cmdimport/test




    I’m getting a different error: 

    Setting import mode to default value TRY_TO_MATCH
    Setting import target to default ca_objects.
    Setting target identifier type to default value AUTO
    Setting representation identifier type to default value AUTO
    Setting target type to default postkarten
    Setting target access to default öffentlicher Zugang
    Setting representation access to default öffentlicher Zugang
    Setting target status to default neu
    Setting representation status to default neu
    Found 50 files
    Processing media                                                                                                                          0.0% 0/50 ETC: ???. Elapsed: < 1 sec [>                              ]PHP Fatal error:  Class 'ca_data_importers' not found in /var/www/html/import/app/lib/ca/Utils/CLIUtils.php on line 4262

    Anything I’m missing? My command was

    bin/caUtils import-media --username=myusername --source=/data/import/vorderseiten/50 --match-type=CONTAINS --match-mode=FILE_NAME --representation-type=front

  • That's error is due to a mistake in the error reporting code. It will be fixed today. The import itself is throwing a real error, but the act of displaying it is causing the fatal error you see.

  • The equal signs don't seem to make any difference-they give the same error either way.  When I write out the the options instead of using the abbreviations: 

    php bin/caUtils import-media --source D:/cmdimport/test --username Administrator --log D:/logs/cmdimport/cmd_import_error.txt --log-level INFO  --include-subdirectories true --add-to-set 1 --match-type CONTAINS --match-mode FILE_NAME --import-mode ALWAYS_MATCH  --import-target ca_objects --import-target-type image

    I got the same error you did. 

Sign In or Register to comment.