Problem/Motivation

Site Audit will not run if you have a version mismatch between Site Audit and the Drupal version of the site to be audited. Example: site_audit-7.x-1.x and a D8 site or site_audit-8.x-2.x and a D7 site.

Proposed resolution

Update documentation to detail recommended installation instructions so that you can run site_audit against both D7 & D8 sites.

Comments

markdorison created an issue. See original summary.

fluxsauce’s picture

Title: Update documentation to detail installing for D7 & D8 side by side » Support both Drupal 8 and Drupal 7 in the same version of site_audit
Version: 8.x-2.x-dev » 8.x-3.x-dev
Component: Documentation » Code
Assigned: Unassigned » fluxsauce

Hi Mark, I don't have a practical solution off the top of my head. I'm going to experiment a bit, you might be able to create a drush folder in the site root and that might take precedence, but that doesn't work on a platform unless you made a symbolic link in every single site back to the correct version of site_audit. That's suboptimal.

It's probably going to be best if the 8.3.x version supports both Drupal 7 and 8.

When I started the Drupal 8 version a couple years ago, there were drush compatibility issues that guided my decision. In retrospect, that was a bad call and now I need to merge them.

benjifisher’s picture

I would like to see this, too. I imagine it will be a ton of work.

In the mean time, can you at least mention on the project page that users should download the correct branch to work with their version of Drupal?

As a work-around, we could try something like this after downloading the git repository as ~/.drush/site_audit:

#!/bin/bash
# file drush_sa_7
git -C ~/.drush/site_audit checkout 7.x-1.x
drush "$@"

and then invoke, for example drush_sa_7 audit_all.

Make a similar file drush_sa_8. Both of them have to be somewhere in your $PATH.

Older versions of git do not support the -C option, so use --work-tree=$HOME/.drush/site_audit --git-dir=$HOME/.drush/site_audit/.git instead.

norman.lol’s picture

I guess that's going to be difficult on the long run. Drupal 9 is released now and requires Drush 10. While Drupal 7 requires Drush 8. In the meanwhile the project type also has changed to Drupal module in the current 8.x-3.x branch. I tend to close this as won't fix and focus on updating the docs to highlight the differences this makes now.

norman.lol’s picture

Status: Active » Closed (outdated)
Related issues: +#3052993: Porting Site Audit 2.x to Drush 9.x
norman.lol’s picture

benjifisher’s picture

It makes sense to close this issue. I care much less about this issue now than I did in 2016.

norman.lol’s picture

👍