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

gitify/setup.sh issues, especially on Wordpress

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Incomplete
    • Affects Version/s: 4.6.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      Apologies for any inaccuracies, I am just learning to use CiviCRM with git.
      I use git with CiviCRM not to actually develop new code, but to make it easy to upgrade to new versions while preserving local modifications. Through version 4.5, I could simply switch to the new release tag in the main, Wordpress, and packages repos, them run gencode.xml. For 4.6, I had to redo my git setup. I followed the instructions here (http://wiki.civicrm.org/confluence/display/CRMDOC/GitHub+for+CiviCRM), and I encountered the following issues:
      1. when editing up setup.conf, the instructions from gitify indicate that the db connection parameters are necessary, but in fact they are optional if you run setup.sh -Dg. Perhaps this should be mentioned?
      2. composer dependency: this is not mentioned in the documentation. After installing composer, the script could proceed
      3. bower/npm dependency: also not mentioned in the documentation. Strictly speaking, these tools appear to be useful for development, but not required for running a git-based version of CiviCRM. If this is correct, then the setup.sh script should indicate this.
      4. In Wordpress, the CiviCRM root folder (plugins/civicrm/civicrm) is not the same as the CiviCRM plugin folder (plugins/civicrm). This leads to several issues after running gitify.
      a) a CRM folder inside the plugin folder (plugins/civicrm), as part of the core repo, but another CRM folder remains in the CiviCRM root folder (plugins/civicrm/civicrm). This orphaned folder is where code actually runs from. Developers will not know that there are two folders and this will lead to unexpected behavior (se my last comment in CRM-16590)
      b) Several folders distributed under the Wordpress repo are not linked to correctly. So if a developer makes a change to plugins/civicrm/assets, this will not show as an edit when running git status, because the ‘real’ assets folder is in the Wordpress subfolder. I have fixed this by removing the non-version control files and replacing them with symlinks. I did this with the following: civicrm.php, uninstall.php, includes, wp-cli, languages, assets, readme.txt, README.md
      5. in a Wordpress environment, one cannot run gencode.php directly anymore. If I run php xml/GenCode.php, I get this error:
      PHP Warning: DOMDocument::load(): I/O warning : failed to load external entity “/site.org/wp/wp-content/plugins/civicrm/version.xml" in /site.org/wp/wp-content/plugins/civicrm/CRM/Core/CodeGen/Util/Xml.php on line 15
      If I do cd xml; php GenCode.xml, I get
      PHP Fatal error: Uncaught exception 'Exception' with message 'Failed to locate template for civicrm.config.php' in /site.org/wp/wp-content/plugins/civicrm/CRM/Core/CodeGen/Config.php:33
      GenCode does run correctly from within setup.sh -g, possibly because setup.sh provides additional parameter

      Hope this helps.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rares Rares P
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: