Comment to 'Can't apply upgrade because too many files(60%) were modified in Persons and Protean module'
  • Problem solved! 

    I have solved upgrading problem due to hash failing by disabling "check_module_hash"

    in a file: /studio/classes/BxDolStudioUpdater.php

    here around line 31 by commenting out with double slash "//" :

    //     'check_module_hash' => array(
    //      'title' => _t('_adm_txt_modules_check_module_hash'),
    //       ),

    and I just temporary removed the code for  "check_module_hash " :

            //--- Check hash ---//

    removed code:

            $aFiles = array();
            $this->hashFiles(BX_DIRECTORY_PATH_ROOT . 'modules/' . $this->_aConfig['module_dir'], $aFiles);
            list($aFilesChanged, $fChangedPercent) = $this->hashCheck($aFiles, $aModuleInfo['id']);
            $bAutoupdateForceModifiedFiles = getParam('sys_autoupdate_force_modified_files') == 'on';
            if(!empty($aFilesChanged) && !$bAutoupdateForceModifiedFiles) 
                return array_merge($aResult, array(
                    'code' => BX_DOL_STUDIO_IU_RCE_MODIFIED,
                    'message' => $this->_displayResult('check_module_hash', false, '_adm_err_modules_module_was_modified', $bHtmlResponce),
                    'result' => false
                ));
            else if($fChangedPercent > BX_FORCE_AUTOUPDATE_MAX_CHANGED_FILES_PERCENT && $bAutoupdateForceModifiedFiles) 
                return array_merge($aResult, array(
                    'code' => BX_DOL_STUDIO_IU_RCE_CHECKSUM_FAILED,
                    'message' => $this->_displayResult('check_module_hash', false, _t('_sys_upgrade_files_checksum_failed_too_many_module', round($fChangedPercent * 100), $aModuleInfo['title']), $bHtmlResponce),
                    'result' => false
                ));

    After that upgrade of failing modules upgrade for Persons and Protean succeeded. 

    In Studio -> Apps Market I can now see:

    Persons
    BoonEx • 11.0.1

    and

    Protean
    Boonex • 11.0.3

    as expected.

    I did that because I was 100% sure that I haven't change any modules files so it was  strange why "Check hash " didn't pass.
    I restored studio/classes/BxDolStudioUpdater.php after upgrade.