Module short names (or system names or machine names) should be lowercase, and we shouldn't allow people to create/promote full projects while violating this convention.

This is documented for both Drupal 6.x and for 7.x: "This short name will be used in all file and function names in your module, so it must start with a letter and by Drupal convention it must contain only lower-case letters and underscores."

(Having mixed-case names also causes problems with update functions #200628: Problem with update of mixed case module names and reasonable usage of Drush #1189178: Capital letters in machine name confuses Drush (and me).)

This task will affect this issue as well and is part of the D.O. upgrade from 6 to 7 (Convert project URLs to lower case.) : #1189292: Let enforce lower case names for new projects

Comments

mlncn’s picture

Project: Drupal.org infrastructure » Project
Version: » 6.x-1.x-dev
Component: Git » Projects

Moving from the Drupal.org infrastructure queue to Project module, per advice in #drupal-infrastructure. Would this have to be drupal.org specific or can this be assumed a sanity check on any (Git) project?

dww’s picture

This seems a bit close to a d.o-only hack. However, I can see other reasons you might want to force lowercase shortnames (e.g. you want to keep all your URLs lowercase, so you don't want project/CamelCaseSucks aliases). I guess a single checkbox for "Require lowercase project short names" at admin/project/project-settings would work, and we've already got a special function directly in project.module just for validating this field (since there are already a lot of things we're checking for, and we need to validate it in a few different places):

project_validate_project_shortname()

So sure, patches welcome there (along with project_settings_form() for the checkbox).

Thanks,
-Derek

senpai’s picture

Issue tags: +project, +drupal.org D7

Tagging for the D7 upgrade initiative.

redhatmatt’s picture

Two MAIN items to address and estimate time on:

  1. Enforcing all future modules to be only lowercase.

    (Having mixed-case names also causes problems with update functions [#200628]: Problem with update of mixed case module names this problem seems complete from what I've read and simply needs review which I will do: 2hr

  2. Converting the URLs to all lowercase. There are 183 projects with uppercase letters. sdboyer will script a conversion and apply with an update hook this will require around 4hr of time. 1hr will be spent taking care of 301s to redirect old to new. 1hr should also be applied for additional issues.

-- and one more issue as far as how to "take care" aka update Drush and it's release xml after all of this is done. #200628: Problem with update of mixed case module names

redhatmatt’s picture

Issue tags: +8hr
StatusFileSize
new3.49 KB
redhatmatt’s picture

Issue tags: +8hr

Added actual task to change URLs to lower case: #1832934: Convert all URLs to all lowercase.

redhatmatt’s picture

Issue tags: -8hr
dww’s picture

dww’s picture

Issue summary: View changes

Referencing relevant cross task URL: Convert project URLs to lower case. https://drupal.org/node/1832934

marvil07’s picture

Title: Enforce lower case names for new projects » Let enforce lower case names for new projects
Status: Active » Needs review
StatusFileSize
new2.05 KB

Status: Needs review » Needs work

The last submitted patch, 0001-Issue-1189292-Let-enforce-lower-case-names-for-new-p.patch, failed testing.

marvil07’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Status: Needs work » Needs review
drumm’s picture

Status: Needs review » Fixed

Committed!

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

Anonymous’s picture

Issue summary: View changes

added proper url