Troubleshooting & Tips

Last updated on
13 June 2020

Troubleshooting

Solve the most common issues encountered with the GIT Info Report module.

  1. An error on the status report indicates that the detailed report cannot be generated.
  2. An error on the detailed report itself indicates the same or that file permission or private repository access issues for the user www-data (see below) should be fixed.
  3. Another error indicated in the logs.
  • Keep in mind that the shell commands are executed as the Apache/Nginx user (e.g. www-data). This might lead to different results due to limited access permissions for the remote. The solution is to assign the user www-data an SSH key to add to the remote repo.
  • The correct indenting of a nested unordered list depends on the used admin theme. It has been tested to work well with:
  • If no tag for a Git folder exists then probably branches are used for release management.
  • The fuzzy timestamp (time ago) granularity is not the same as the number of units. Sequential units in the hierarchy will not get skipped. For example with a granularity of two '5 months 19 hours' will be shown as '5 months'. After a week it will then turn into '5 months 1 week'.
    To avoid confusion a Drupal core feature request was opened:
    #3093434: Extra option to formatDiff: Allow granularity to skip units

Tips

Use 'composer --prefer-source' instead of 'git clone'

Instead of using git clone when developing on a dependency package itself (for module developers), you might want to use Composer to make sure the module gets also added to the composer.json file and dependencies are grabbed as well. An example with the Git Info Report module:

composer require drupal/gitinfo:1.x-dev --prefer-source
cd web/modules/contrib/gitinfo
git checkout 8.x-1.x # Change from the default branch (latest stable) to the development branch
git remote set-url origin git@git.drupal.org:project/gitinfo.git # As a module maintainer use SSH to connect to the remote
git pull # Verify the connection

x

Put a "convenience" .gitignore in the module root

The following .gitignore will save you time to correct mistakes by others or yourself:

# Ignore the config folder used by PhpStorm.
/.idea/

# Ignore common macOS files.
.DS_Store

# Ignore directories generated by Composer. Only relevant if you have a composer.json.
/vendor/

# Ignore patch files.
*.patch

Help improve this page

Page status: No known problems

You can: