When adding Project issue voting, I realized I needed to add another reserved project name "votes". However, instead of hard-coding that into project.module itself, it seems much better to just make this a hook.

Comments

dww’s picture

Patches for HEAD of project, project_issue, and project_issue_voting. Tested locally and working fine. Any objections?

dww’s picture

Whoops, sorry, that was the wrong patch for project + project_release. Use this one (the *.project_issue* patches from #1 are still fine).

aclight’s picture

My only concern about this going in is that then if a site starts out with only the project and project_release modules, for example, and then someone creates a project called "issues" or "voting", but then later the site wants to also install project_issue and project_voting, there will be problems.

On the flip side, once we start using views the paths that a site might use open up termendously, since things won't be hard coded. So there's the potential that a site that uses non-default paths for the various views might either need to restrict the list of possible projects even further, or may not need to restrict them at all. So having a hook that the site admin could use would be very beneficial.

Maybe we want to add something to hook_requirements that displays a warning if there are collisions between project names and any of the reserved names that come up at a given time from calling this new hook? At least then the site admin could fix things before they got too ugly.

hunmonk’s picture

i want to get rid of the reserved name stuff altogether, so i don't like the idea of adding in a hook for it now. i have an issue floating around somewhere for that...

dww’s picture

I find it impossible that we'll be able to completely get rid of them, and a hook seems better than hard-coding for many reasons. But, if a link to hunmonk's issue materializes, I'll take a look. ;) I think the hook_requirements() check would be a nice touch as a follow-up issue/patch.

aclight’s picture

  • drumm committed 8dda7e0 on 7.x-2.x
    Issue #296071 by dww: Instead of hard-coded list, invoke...
drumm’s picture

Version: 5.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes
Status: Needs review » Fixed
Issue tags: +affects drupal.org

Re-rolled & committed. Thanks!

This is useful for https://docs.gitlab.com/ee/user/reserved_names.html#reserved-project-names

Status: Fixed » Closed (fixed)

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

drumm’s picture