Closed (fixed)
Project:
Drupal.org customizations
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
13 Jan 2014 at 22:19 UTC
Updated:
23 May 2014 at 18:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
tvn commentedComment #2
drummSpaces should not be allowed.
Comment #3
valthebaldComment #4
valthebaldI assume this will need a test
Comment #5
valthebaldHere's the patch that solves the issue.
It needs a test, but since most tests are switched off for project.module, I'd rather create a followup issue for that
Comment #6
valthebaldComment #7
drummThe error message should be a complete sentence, with punctuation. And more friendly — what's an incorrect symbol? Should follow the function naming, from http://www.php.net/manual/en/functions.user-defined.php:
Comment #8
valthebaldValidation rule and error message changed per #7.

Error message after applying patch #8:
Comment #9
drummLooks like the condition is reversed. Valid names get the error.
Comment #10
valthebaldMy bad, of course it is
Comment #12
drummLooks good. Committed & deploying.
Comment #13
tvn commentedwohoo! thanks valthebald!
Comment #15
drummReverting because of #2227791: Project page error: Short name must follow PHP naming convention.
Comment #16
drummLet's actually move this to drupalorg. Project module should be a bit generic, it could be used for non-PHP project anyway.
This validation should run only for full projects.
Comment #17
valthebaldHere's the patch against drupalorg
Comment #18
drummSorry I didn't put this detail in earlier, I was in a hurry.
This should go in
drupalorg_project_form_node_form_alter(), withinThe project node type shouldn't be hard-coded since modules, themes, etc are actually separate node types.
Comment #19
valthebaldChanged per #18
Comment #21
drummLooks good. Will deploy today.
Comment #22
drummNow deployed to Drupal.org.
Comment #23
dwwGlad to see this resolved, and for the validation to be in drupalorg_project, not project.module itself. It was originally discussed in #1561458: Require project node machine names to be valid Drupal module/theme machine names, but since all the Git commits point here I marked that one duplicate (even though it was the older issue).
Thanks everyone!
-Derek