Closed (fixed)
Project:
Project
Version:
6.x-1.x-dev
Component:
Projects
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
25 Apr 2010 at 18:22 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sdboyer commentedAlso, we need to generate a list of modules/themes that don't map 1:1 in this way right now and decide on a way to rectify it. My vote is that we move them to a new shortname+URL that corresponds exactly to the entry in CVS, mark both the old and new shortname namespaces as occupied, then put a 301 redirect on the old project URL to the new one. I _think_ that would be the least destructive for projects running the items that get their names switched around.
On the bright side, this should be one less piece of complexity to be sorted out in updates...
Comment #2
mikey_p commentedOkay, this is going to need to be sorted out in the initial port to vcs_git and that is probably where the form_alter should live as well.
Comment #3
mikey_p commentedActually thought some more about the mapping and naming, and I think that we may need to make a list of projects that don't map, and let the module maintainer choose whether they'd like to keep their cvs directory name, or the project's shortname, as they may have their actual module or namespace used within their module based on either. I don't think the actual mapping of occupied namespaces needs to have anything to do with this, as there is a project_info module in the works that could handle that, but you'd have to ask dww for the details.
Comment #4
damien tournoud commentedIn case there is a mismatch, it is better to keep the project short name:
1. It is used as a key for several external things: update module, testing, packages, etc.
2. We can change the repository name easily during the conversion process
Comment #5
mikey_p commentedDamien raises some excellent points here, since among all repos (which in cvs are broken out so that modules, themes, profiles all get their own namespace) the short name on d.o is the closest thing we have to a global namespace for all d.o projects. This also avoids linkrot or redirects on d.o.
The next question is where should this could live, vc_git, vc_project, or drupalorg?
Comment #6
marvil07 commentedIMHO using the project shortname is the best option, for the points mentioned in #4
I think this hook_form_alter could live in:
- project, as a global configuration flag "let modify project-shortname", or if not accepted on
- versioncontrol_project, since this is not an specific git change
Comment #7
mikey_p commentedOkay, I'll try to roll a patch for project that adds this.
Comment #8
mikey_p commentedComment #9
hunmonk commentedComment #10
hunmonk commentedchanges in this patch
Comment #11
damien tournoud commentedYou should be able to add
#input => TRUEto the element for its value to be processed in the$form_state['values'].Comment #12
hunmonk commenteddamz's approach seems to be a bit cleaner, so i went with it. note that you also have to explicitly pass #value for type 'item' -- i guess #default_value won't work.
attached has been well tested and seems to work perfectly.
Comment #13
mikey_p commentedLooks RTBC to me, testing this with editing existing, and creating a new project, each with the setting enabled and disabled. The only thought I had was that it might be nice to include the explanation text when editing and locked, so that the user knows why the item is still appearing, but they can't edit.
Comment #14
hunmonk commentedi had that thought as well, but decided that since it's not a form field, it's pretty obvious that it's not editable, plus they got the explanation the first time ;) i say save the screen real estate on that -- we can add it if it becomes a UI issue.
committed to 6.x-1.x-dev, and deployed on drupal.org
Comment #15
mikey_p commentedHere's a super short test for this.
Comment #16
dwwReviewed, tested and committed #15 to HEAD, thanks.
See also #997906: Reconcile project_allow_uri_update == FALSE and sandbox projects being promoted to full projects ... ;)