Why is this "Failed to copy" with no other info in the logs or in Display Log?

Why is this "Failed to copy" with no other info in the logs or in Display Log?

I am trying to copy over files that were created in the previous instance of sugar.. That is the sugarfield file

CEFields.zip

  • Hi Amy,

    Can you paste your full error log? Does it mention any specific file name when it says "Failed to copy"? This error is printed when Sugar is not able to copy a specific file:

    if (!copy("$zip_from_dir/$file", "$target_dir/$file")) {
    return $this->error("Failed to copy: $file");
    }
  • Have a look on that two copy elements:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    array(
    'from' => '<basepath>/Files/custom/Extension/modules/Lev_Course_Costs/Ext/Vardefs/sugarfield_total_to_client.php',
    'to' => 'custom/Extension/modules/Lev_Course_Costs/Ext/Vardefs/sugarfield_total_to_client.php',
    ),
    ...
    array(
    'from' => '<basepath/Files/custom/Extension/modules/Lev_Contracts/Ext/Vardefs/tugarfield_contract_status.php',
    'to' => 'custom/Extension/modules/Lev_Contracts/Ext/Vardefs/tugarfield_contract_status.php',
    ),
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    You see the difference between line 2 and line 9?

    'from' => '<basepath>/... surely works

    'from' => '<basepath/... never works

    The missing ">" after basepath kills the copy statement.

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

  • I have not looked in detail but at first look I noticed that you have a

    sugarfield_contract_status.php

    and a

    tugarfield_contract_status.php

    in your Lev_Contracts/Ext/Vardefs

    both are dictionary entries for contract_status, did you mean to have two?

  • The upper copies are commented out, the first copy is still ok, having the correct <basebath>, from copy no.2 the <basepath appears and finally, the last test is for tugar .... :-)

    Harald Kuske
    Principal Solution Architect – Professional Services, EMEA
    hkuske@sugarcrm.com
    SugarCRM Deutschland GmbH

  • Thank you sooooo much!!!