Similar issue to #2974638: Install file calls functions in .module before loading them, when installing google_tag >1.0 via a profile (e.g the module is listed in the profile's dependencies), the installation fails with the following error:

 [warning] The following module is missing from the file system: google_tag bootstrap.inc:268
[04-Sep-2018 11:56:09 Australia/Adelaide] Error: Call to undefined function _google_tag_is_writable() in /code/web/modules/contrib/google_tag/google_tag.install on line 31 #0 /code/web/core/includes/install.inc(967): google_tag_requirements('install')

This is because the install file calls module_load_include(), which calls drupal_get_path, which calls drupal_get_filename that relies on the module existing which, at that point, it doesn't.

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Issue summary: View changes
solotandem’s picture

You mark this issue version as 1.x and refer to a similar issue [which is fixed], but what version did you test with, 1.0? How does this differ from the aforementioned similar issue? If the bug was fixed for the 'install' phase in the other issue, then it should be fixed for an install profile. If you disagree, please provide facts to support the claim. Otherwise this appears to be duplicate and-or closed (outdated).

acbramley’s picture

@solotandem I did state in the issue summary:

>when installing google_tag >1.0 via a profile

So this is specifically for the latest stable release (8.x-1.1), or the latest dev release. It is fixed by rolling back to 1.0.

It differs from the other issue as this is specifically when enabling the module via an install profile which seems to be slightly different.

  • solotandem committed 69385dc on 8.x-1.x
    Issue #2997065 Replace module_load_install() with require_once in...
solotandem’s picture

Assigned: Unassigned » solotandem
Status: Active » Fixed

Yes you did; my apology.

Let me know if the latest commit solves this use case. Thanks for reporting it.

Status: Fixed » Closed (fixed)

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

grimreaper’s picture

Hello,

It would be good to have a new release of the module to avoid getting this error when using the 8.x-1.1 version.