Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19914

civicrmHooks.php issues on windows

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.15
    • Fix Version/s: 4.7.23
    • Component/s: None
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Core Team Funds
    • Verified?:
      No

      Description

      The problem is that on Windows path might resolve differently, because of notation.

      In wordpress.php hooks file CiviCRM is doing a check as follows:

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
              if (!empty($config->customPHPPathDir) &&
                file_exists("{$config->customPHPPathDir}/civicrmHooks.php")
              ) {
                  @include_once "civicrmHooks.php";
              }
      

      Problem is that even if file exists it will not be included (silent error ignore) in specific cases.

      This could be easily fixed by using include with full path as follows:

      Unable to find source-code formatter for language: php. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
                  @include_once "{$config->customPHPPathDir}/civicrmHooks.php";
      

        Attachments

          Activity

            People

            • Assignee:
              timotten Tim Otten
              Reporter:
              flies Arkadiusz Rzadkowolski
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: