During installation it turns out, that the directory name is google_analytics in stead of googleanalytics. Because all the code refers to googleanalytics, this causes the newly installed system to barf.

Renaming the directory to googleanalytics solves the issue.

CommentFileSizeAuthor
#22 google_analytics.patch639 bytestimdaman
#16 ga2.png85.72 KBlakshminp
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hass’s picture

Category: bug » support
Status: Active » Fixed

Incorrect. No need to rename a directory.

abonnema’s picture

Category: support » bug
Status: Fixed » Active

I just checked: the issue is not incorrect.

The tar file for 6.x-2.2 really does have the directory google_analytics.
If you install by coping to sites/all/modules as instructed, then the config for Google Analytics will not work. You will get an error, stating the directory googleanalytics could not be found. Indeed, all the files refer to googleanalytics, not google_analytics.

Renaming the directory from google_analytics to googleanalytics, fixes the issue.
So, please fix the error. At least install the tar from the public download and confirm that the directory is wrong. Config will not work.... until you rename.

hass’s picture

Category: bug » support
Priority: Normal » Minor
Status: Active » Postponed (maintainer needs more info)

The directory need to be named sites/all/modules/google_analytics *not* googleanalytics. I have no idea what you are doing there and how you install. There are ~32000 known installations out there not having your issue. Find the source and fix your bug, please.

abonnema’s picture

okee, I will recheck what is wrong.
I will get back to you as soon as I can confirm what is wrong (or confirm that nothing is wrong).

hass’s picture

Status: Postponed (maintainer needs more info) » Fixed

At very first - disable mod_security

Status: Fixed » Closed (fixed)

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

DamienMcKenna’s picture

Title: Installation issue: wrong directory name » Different project vs module name - google_analytics vs googleanalytics
Version: 6.x-2.2 » 6.x-3.0
Category: support » bug
Priority: Minor » Normal
Status: Closed (fixed) » Needs work

Am reopening this ticket and re-focusing it on the fact that the module and project name are different when they should be the same - the project is "google_analytics" while the module is "googleanalytics". The SEO Checklist module went through the same problem last year.

hass’s picture

Title: Different project vs module name - google_analytics vs googleanalytics » Installation issue: wrong directory name
Version: 6.x-3.0 » 6.x-2.2
Category: bug » support
Priority: Normal » Minor
Status: Needs work » Closed (fixed)

What is the technical problem?

Changing filenames can be done IF core supports this. Today I'm not aware that this can be done easily without breaking upgrade paths.

jwilson3’s picture

Status: Closed (fixed) » Active

Asking an open ended question requesting more information and marking something as FIXED seems a little odd. How is this issue FIXED?

As far as much of the community is concerned, the issue is more of a usability and being considerate of your user base, and sticking to standard procedures than anything. I can certainly remember a WTF? moment, the first time i installed this module with drush. It also adds WTF minutes, reported in issues elsewhere when you download the module, and expect to get a url in system settings that matches the file you downloaded (eg admin/settings/google_analytics), but it doesnt show up.

In fact, I found an issue: #913664: module googleanalytics and project name google_analytics differ and causes an avoidable confusion in drush dl and drush en that outlines one of the technical problems that people have come across during installation and setup of this module... which you've marked as a DUPLICATE, but didn't mention what issue it was a duplicate of.

If you add up all the people that have used drush to install this module or navigated to the settings page by typing the url of the supposed module name, based on the project name hosted at d.o and get a 404, then collectively thats a lot of needlessly wasted minutes going W. T. F. is going on here!?!

Also, please be careful changing the status, and if you deem this issue to truly be closed, please change it to an accurate state.

hass’s picture

I do understand your concern, but I also do understand that renaming will break the module upgrade path. I'm not the guy who have made the fault and have not followed the typical rules. For now Drupal does not support such module renames and it will be a very bad hack to get this issue solved. I'm myself not sure how to do this in a "half clean way".

All modules for google are prefixed with google_ on d.o and I do not like to break with this unwritten "rule". The only rename we can really do is the folder of googleanalytics, but this would remove the underscore. And we loose the current project namespace and all links to the old namespace d.o/project/google_analytics are going to be broken. This is a way I do not like to go, but it would not break the upgrade path. I hope you understand that links on the internet are more important than your WTF.

On the other side we could rename the module itself from googleanalytics.module to google_analytics.module, but this will break the upgrade path! And this - only for a few users of a very buggy module like Drush, see #921116: drush updatecode should fork to a backend process to avoid problems to get an idea how buggy it is...

Otherwise I'm asking as always - HOW do you install CCK or other modules with submodules? I guess you also have no answer like all others why you do not complain that cck cannot installed with "drush en cck" - here you also need to name them content, text and others...

If you know a way how we can upgrade without telling all users to manually re-enable the module and without breaking the upgrade path - than we may do this.

hass’s picture

hass’s picture

As said in #952944: Show available (sub-)module names after module package has been downloaded there is no longer any WTF.

$ drush dl cck
Project cck (6.x-2.8) downloaded to /tmp/cck.                                                                                                     [success]
Project cck contains 9 modules: fieldgroup, nodereference, number, userreference, content_permissions, text, content_copy, optionwidgets, content.
hass’s picture

Status: Active » Closed (fixed)

Again, no feedback how to change module paths without breaking anything. Buggy Drush has been fixed - so no WTF anymore.

lakshminp’s picture

Status: Closed (fixed) » Fixed

why can't we do a "git mv" for the following files:

  • googleanalytics.admin.inc
  • googleanalytics.info
  • googleanalytics.test
  • googleanalytics.install
  • googleanalytics.module
  • googleanalytics.tokens.inc
hass’s picture

Status: Fixed » Closed (fixed)
lakshminp’s picture

Status: Closed (fixed) » Active
FileSize
85.72 KB

Installation complains of a missing module in Drupal 7.

hass’s picture

Status: Active » Closed (fixed)
wiifm’s picture

Title: Installation issue: wrong directory name » Rename the module so that it matches the project name to avoid confusion
Version: 6.x-2.2 » 7.x-1.x-dev
Priority: Minor » Normal
Status: Closed (fixed) » Active

So to sumarise this issue:

Project name - don't want to change due to unwritten rule that says all google related modules must start with 'google_'
Module name - don't want to change as this breaks upgrade paths

I hear what you are saying @hass, but you need to realise this does cause issues for real people. Issues this is causing:

May I suggest an alternative approach:

For drupal 8, create a module called 'google_analytics' (within the same project) and give this the ability to upgrade the D7 module 'googleanalytics'. Document this on the project homepage, and ensure everyone is aware the name will be changing. This is not that uncommon with drupal.

I believe this keeps everyone happy

What are your thoughts?

hass’s picture

Priority: Normal » Minor
Status: Active » Closed (fixed)

Drush solved this. And I ask again - how have you installed cck modules?

jwilson3’s picture

Status: Closed (fixed) » Active

Hi Hass,

A couple things come to mind here. This may be a bit abrupt, but I hope it is at least sound logic.

a): you're confusing a DX improvement from a third party module that cures one of the *symptoms* of the issue to be the actual resolution of the issue. Installation confusion with Drush was only one of the possible symptoms that was being experienced by the missing underscore. Instead of depending on Drush as the official solution to the problem, why not follow suit with Drush and fix the original DX issue here as well?

b) It's not fair to make CCK your measuring stick, for two very simple reasons:

  • CCK was (and still is) a family of modules, much like Ubercart, and other "kit" type modules. Grouping multiple modules under a shorthand name is a common standard used widely. Google_Analytics on the other hand contains a single module confoundingly named GoogleAnalytics. The comparison to CCK is comparing apples with oranges. If you can find another project on D.o that contains a single module named differently from its project name that hasn't already been fixed, then that would be an adequate measuring stick. As mentioned in #7, SEO Checklist already resolved their issue. Why can't Google Analytics?
  • CCK largely solved its issue (if you still consider that it had one) as well; by following a similar process as that suggested in #18: during the major version upgrade to Drupal 7, it worked its way into new separate modules whose foldername match their respective module name. The CCK module today remains as a "kit" of add-on modules that you might need in addition to the evolved content construction modules in core.

c) Simply put, it cannot be denied that there is still a very simple but very real naming problem being experienced here. You yourself mention that the proper name space is google_, other modules you maintain do not suffer from this issue. #18 is the first valid attempt a finding a real solution to the actual problem. Please reconsider.

I'd like to reopen and tag this for visibility.

wiifm’s picture

Appreciate the input @jwilson3,

If #18 can be agreed as a way forward, I can start writing a patch for D8 (that includes an upgrade path for the D7 module).

timdaman’s picture

FileSize
639 bytes

All,
I have a simple non-technical solution that would really help people like me who spend more than an hour installing this module for the first time using drush. Why not put something like this in the readme:



If using drush please be aware that the project and module name do not match. The project is google_analytics and the module name is googleanalytics.
To install:
#download the project
drush en google_analytics
#to enable the module in the project
drush en googleanalytics



Attached is a patch to README
hass’s picture

Download is "dl"

hass’s picture

Category: support » task
Status: Active » Postponed
Chim’s picture

If you're using an installation profile and you're getting the missing module error in Drupal 7...

This is a fairly simple problem to solve,
(no-one is going to rename the module or the project for D7, as this will break sites).

In your Drush Make file use the project name...
projects[google_analytics][subdir] = "contrib"

In your Drupal Installation .info file use the module name...
dependencies[] = googleanalytics

x610’s picture

I have got an issue, when using features. If you export variables into features, and trying to do feature revert in future - it will throw a fatal error:

php: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null: UPDATE {role_permission} SET module=:db_update_placeholder_0 [error]
WHERE ( (rid = :db_condition_placeholder_0) AND (permission = :db_condition_placeholder_1) ); Array
(
[:db_update_placeholder_0] =>
[:db_condition_placeholder_0] => 3
[:db_condition_placeholder_1] => administer google analytics
)

It looks for module google_analytics, which does not exists in system, if I change project = googleanalytics in info file - it fixes feature revert functionality.

frob’s picture

Status: Postponed » Active

@hass, comment 18 looks like a good way forward and a way to alleviate our problem as well.

@wiifm, if you are still willing to help port this module to Drupal 8, then lets start a sandbox and clone this project into it. Then we can start a Drupal 8 branch in the sandbox and possibly merge it back into this project once it is stable and hass is willing. Do you follow what I am proposing?

hass, wiifm, I am normally in IRC (#drupal, #drupal-la, #drupal-contribute) if you want to chat.

frob’s picture

hass, how about an easier solution.

Do you want the googleanalytics namespace? I could give you full control and we can move this project over there, thus making this a non issue.

hass’s picture

I explained in length that You should not use the namespaces googleanalytics and google_analytics in any other project. Use google_analytics_lite as example.

Aside, this project here is not too large to be ported and not too difficult to maintain.

frob’s picture

hass, I think we are suffering from a language barrier here. I no longer know what you want. I have moved my project to the google_analytics_lite namespace and I have abandoned the googleanalytics namespace.

I am suggesting that you can fix the namespace issue described in this issue by moving this project to the googleanalytics namespace. That way you don't have to change anything in any of the files.

The namespace of this project should be fixed. If you don't want move to the project over to the googleanalytics namespace then the Drupal 8 branch should be in the google_analytics namespace so that this issue can be resolved.

Let me know if you would like any help with this.

hass’s picture

I pleased you to *rename* http://drupal.org/project/googleanalytics and not to create another project with the new name.

hass’s picture

Version: 7.x-1.x-dev » 8.x-2.x-dev
Status: Active » Fixed

Module in Git is completely broken, but files have been renamed. Functions and variables still needs work, but this is part of the upgrade.

http://drupalcode.org/project/google_analytics.git/commit/a31d74e
http://drupalcode.org/project/google_analytics.git/commit/5035198
http://drupalcode.org/project/google_analytics.git/commit/77092fb

frob’s picture

this is awesome, if I have time this weekend I might submit a patch or two.

Status: Fixed » Closed (fixed)

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

kopeboy’s picture

Version: 8.x-2.x-dev » 7.x-2.x-dev
Priority: Minor » Major
Issue summary: View changes
Status: Closed (fixed) » Needs work

So what's up here, is this the right issue? Another points here.. (https://www.drupal.org/node/2715373)

I am still unable to install this module with drush, how is this fixed?

hass’s picture

Version: 7.x-2.x-dev » 8.x-2.x-dev
Priority: Major » Minor
Status: Needs work » Closed (fixed)

Module has been renamed in D8. No changes will be done older releases. There is no issue, you only need to read the drush output carefully.