Lines 31-32 from google_tag.install:

if (!is_dir($directory) || !_google_tag_is_writable($directory) || !_google_tag_is_executable($directory)) {
      $phase == 'install' ? module_load_include('module', 'google_tag') : '';

This ordering is wrong since the functions called in the first line are in google_tag.module which is loaded in the second line.
I was unable to install the module using the dev version as a result.

Comments

Jody Lynn created an issue. See original summary.

  • solotandem committed f88a920 on 8.x-1.x
    Issue #2974638 Load module file during install before calls to routines...
solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Fixed

Thanks for reporting this.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

cruno’s picture

Assigned: solotandem » Unassigned
StatusFileSize
new3.42 KB

This issue is still occurring in version 1.1. The problem is the module_load_include() tries to get the path for google_tag during hook_requirements before the module is actually enabled, so an empty path is returned.

To reproduce this issue:

  1. 1. Add a profile with google_tag module as a requirement
  2. 2. Try to build the site using drush site-install with the profile
  3. 3. Note the error:
    Error: Call to undefined function _google_tag_is_writable() in /home/vagrant/docroot/docroot/modules/contrib/google_tag/google_tag.install on line 33 #0 /home/vagrant/docroot/docroot/core/includes/install.inc(976): google_tag_requirements('install')

I'm adding a patch which adds the two functions, which live in google_tag.module, and are called in hook_requirements.

cruno’s picture

The patch I wrote above works for 1.x-dev. This one should work for 1.1.

solotandem’s picture

Thanks but this was fixed a month ago. See #2997065: Module can't be installed via an install profile.