Needs work
Project:
Node clone
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2012 at 13:08 UTC
Updated:
15 Nov 2015 at 21:38 UTC
Jump to comment: Most recent
The module's namespace doesn't match the project's d.o shortname.
D.o namespace of this module is node_clone, but module actually uses clone as machine name. This is causing general confusion and various problems when using .make files, drush and dependencies in .info files - see referenced issues.
Fix the module's namespace:
switch the module's name to node_clone in the next major release.
Someone needs to write a patch.
Any reference to clone needs to be node_clone. And now drush will work correctly.
All hooks will be implemented at hook_node_clone_something instead of hook_clone_something
Comments
Comment #1
radimklaskaI think that renaming everything to node_clone is better solution. We can do this as major release, since renaming can break something on updates. We should do this as soon as possible - before releasing stable version.
This inconsitency also breaks some drush workflows. (and maybe d.o namespacing convetions?)
My case:
in dependencies I found "clone"
drush dl clone- does not workclone lives on node_clone
drush dl node_clone- okdrush en node_clone- does not workdrush en clone- finally! :)Comment #2
deekayen commentedMaking clone a dependency of itself would be silly. There is some unfortunate naming, but with the number of users this module has, it's probably stuck.
Comment #3
ladybug_3777 commentedThis threw me off too!
In my .make file I have to reference the module as "node_clone"
projects[node_clone][version] = "1.0-rc2"
but in my installation profile .info file I have to reference it as "clone"
dependencies[] = clone.
At the very least I recommend this being added to the README.txt file This is the first module I've come across that doesn't use the normal naming conventions.
Comment #4
ladybug_3777 commentedI'm changing the status of this because the person that marked this as "Closed - won't fix" seems to have misunderstood the problem. No one is saying that node_clone needs to make clone a dependency of itself. They are saying that the module's official project name, "node_clone", does NOT match the file names which are all called clone.* (clone.info, clone.module, clone.install, etc).
So when creating make files, installation profiles, or using drush to download and enable, people are caught off guard (rightfully so).
The previous suggestion of fixing this in a major release, is the correct one.
Comment #5
ladybug_3777 commentedI just noticed the date of the OP. I'm so surprised this was never done. Hmmm guess it may never actually get fixed... I guess me changing the status to needs review will not likely help it happen.
Comment #6
deekayen commentedAlright, I was wrong and https://drupal.org/project/clone seems to be reserved to resolving this.
Comment #7
radimklaskaI've been thinking about a kind of hacky solution:
Or just freeze 7.x-1.0-rcX right before releasing 7.x-1.0 and release renamed 7.x-2.0 instead. Or some combination of those two.
Comment #8
radimklaskaReferencing other issues, better title and issue summary.
Comment #9
radimklaskaComment #10
ladybug_3777 commentedYay! I'm not sure which solution is the best, but I wanted to say THANK YOU for looking into this again. Much appreciated! As stated the plan is a little hacky, but workable I think!
I'd love to hear other's feedback on the best solution. It's a tough one because people utilize the module in so many different ways and I know you want something that will work for the majority of users. I wonder if another module owner has already dealt with this sort of situation and can provide confirmation of what works best for them. I'm still a bit of a newbie in the module writing department so I'm not the best person to ask, but again, thanks for bringing this to the community!
Comment #11
radimklaskaI just stumbled upon same problem with google_analytics module and found this comment:
( https://drupal.org/node/913664#comment-3462976 )
This comment got me thinking and I have to admit, that I had no problems (except drush dl / en confusion) with this since posting my first comment here.
I still don't like it. Maybe leave it until D8?
@ladybug_3777: You are welcome :-)
Comment #12
frobThe google analytics module is fixing its namespace with the D8 version of the module
https://www.drupal.org/node/427770
I disagree with hass on this one. It is an issue, especially for beginning drupal users/developers. We have these naming conventions for a reason.
Comment #13
dudleyc commentedThis issue blocks the inclusion of the node_clone module in an installation profile. drupal_verify_profile() fails due to the inconsistent naming of this module.
Comment #14
ladybug_3777 commentedThat's not entirely true. I've worked around that problem by doing the following:
In my make file I use:
But then within my install profile I do this:
I agree it's not pretty and it can get confusing, but it will get your install profile running.
Comment #15
frobThe real fix is to fix the namespace.
Either, change modules name in the code or change the project over to a new project with the correct namespace.
I have updated the summary to match what this issue is about to stop confusion. Also, this is a task or a feature request --not a bug.
Comment #16
pwolanin commentedThis won't be fixed for 7.x.
For 8.x I will look at fixed the module's actual name.