This is due to the module being called 'private_content', but it's actually contained in a folder called 'private'.
drush en private_content results in an error
drush en private downloads the module, but results in the following:

Project private contains a module named private_content.
private was not found.                                                 [warning]
Unable to download some or all of the extensions.                      [warning]
There were no extensions that could be enabled.                             [ok]

You then need to run drush en private_content again to enable the module.

Comments

Matt B created an issue. See original summary.

matt b’s picture

Priority: Normal » Minor
adamps’s picture

Status: Active » Closed (works as designed)

Unfortunately the difference in name was unavoidable as 'private' is a reserved word in PHP and cannot be used as a name. Hence we had to use a different name for the module in D8. I'll update the documentation.

matt b’s picture

@AdamPS - why not rename the folder and module name on drupal.org to 'private_content'? Then tools such as drush will work as intended. Currently you have to execute two drush commands to install the module and it is confusing:

drush dl private
drush en private_content

as opposed to just running 1 ''drush en' command which will download the module as well.

adamps’s picture

why not rename the folder and module name on drupal.org to 'private_content'?

It's not really a rename - it would mean creating an entirely new project. The code would have to be copied across, presumably losing history so far. D8 Releases would have to be deleted and recreated on the new project presumably losing old ones. D8 issues would have to be moved over. Users and maintainers would have to be aware that there are two projects. We lose the continuity of issues, documentation, etc. Any existing users of D8 would have to switch.

As we are only alpha, it's not impossible, but it all seems like a lot of work compared to the difficulty of running two drush commands.

I wonder if there is some clever trick we could play with a drush hook. Perhaps it could alter "en private" to "en private_content"?

adamps’s picture

Ah no the drush hook won't work - if the module is not enabled then the drush hooks won't run.

adamps’s picture

Apologies I am being unduly negative. Although there would be a bunch of fiddly tasks, it should be possible to switch in 1 day work. I concede that it would be an advantage in the long term to have the module and project names matching. Obviously we need to decide ASAP.

adamps’s picture

Title: Not smoothly installing with drush » Install smoothly with drush
Category: Bug report » Task
Priority: Minor » Normal
Status: Closed (works as designed) » Active
adamps’s picture

Status: Active » Fixed

Moved D8 to new project

Status: Fixed » Closed (fixed)

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