Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
hass CreditAttribution: hass commentedIncorrect. No need to rename a directory.
Comment #2
abonnema CreditAttribution: abonnema commentedI 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.
Comment #3
hass CreditAttribution: hass commentedThe 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.
Comment #4
abonnema CreditAttribution: abonnema commentedokee, 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).
Comment #5
hass CreditAttribution: hass commentedAt very first - disable mod_security
Comment #7
DamienMcKennaAm 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.
Comment #8
hass CreditAttribution: hass commentedWhat 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.
Comment #9
jwilson3Asking 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.
Comment #10
hass CreditAttribution: hass commentedI 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 ofgoogleanalytics
, 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.
Comment #11
hass CreditAttribution: hass commentedFollowup #952944: Show available (sub-)module names after module package has been downloaded
Comment #12
hass CreditAttribution: hass commentedAs said in #952944: Show available (sub-)module names after module package has been downloaded there is no longer any WTF.
Comment #13
hass CreditAttribution: hass commentedAgain, no feedback how to change module paths without breaking anything. Buggy Drush has been fixed - so no WTF anymore.
Comment #14
lakshminp CreditAttribution: lakshminp commentedwhy can't we do a "git mv" for the following files:
Comment #15
hass CreditAttribution: hass commentedComment #16
lakshminp CreditAttribution: lakshminp commentedInstallation complains of a missing module in Drupal 7.
Comment #17
hass CreditAttribution: hass commentedComment #18
wiifmSo 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?
Comment #19
hass CreditAttribution: hass commentedDrush solved this. And I ask again - how have you installed cck modules?
Comment #20
jwilson3Hi 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:
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.
Comment #21
wiifmAppreciate 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).
Comment #22
timdaman CreditAttribution: timdaman commentedAll,
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.
Attached is a patch to README
Comment #23
hass CreditAttribution: hass commentedDownload is "dl"
Comment #24
hass CreditAttribution: hass commentedComment #25
Chim CreditAttribution: Chim commentedIf 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
Comment #26
x610 CreditAttribution: x610 commentedI 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.
Comment #27
frob@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.
Comment #28
frobhass, 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.
Comment #29
hass CreditAttribution: hass commentedI 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.
Comment #30
frobhass, 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.
Comment #31
hass CreditAttribution: hass commentedI pleased you to *rename* http://drupal.org/project/googleanalytics and not to create another project with the new name.
Comment #32
hass CreditAttribution: hass commentedModule 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
Comment #33
frobthis is awesome, if I have time this weekend I might submit a patch or two.
Comment #35
kopeboy CreditAttribution: kopeboy commentedSo 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?
Comment #36
hass CreditAttribution: hass commentedModule 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.