Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Infinite loop when trying to enable not available extensions in Drupal 8 #5

Closed
weitzman opened this issue Aug 18, 2013 · 14 comments
Closed

Comments

@weitzman
Copy link
Member

Original issue at https://drupal.org/node/1989202

@kostajh
Copy link
Contributor

kostajh commented Nov 6, 2013

This may be related, or maybe it needs a separate issue, but you get an infinite loop when attempting to enable a package where the project name exists but the project does not contain a module of the same name. For example, in Drupal 7, if you try

drush en logging_alerts -y, you'll get:

logging_alerts was not found.                                                                                                                                        [warning]
The following projects provide some or all of the extensions not found:                                                                                              [ok]
logging_alerts
Would you like to download them? (y/n): y
Install location sites/all/modules/contrib/logging_alerts already exists. Do you want to overwrite it? (y/n): y
Project logging_alerts (7.x-2.2) downloaded to sites/all/modules/contrib/logging_alerts.                                                                             [success]
Project logging_alerts contains 4 modules: errorlog, watchdog_triggers, watchdog_rules, emaillog.
logging_alerts was not found.                                                                                                                                        [warning]
The following projects provide some or all of the extensions not found:                                                                                              [ok]
logging_alerts
Would you like to download them? (y/n): n

@FreekyMage
Copy link

Just to confirm that this is still broken for Drupal 8, it works for Drupal 7 though.

@davereid
Copy link
Contributor

Still broken on Drupal 8. Anyone have links to where this was fixed for Drupal 7?

@jonhattan
Copy link
Member

It was never broken for Drupal 7.

Problem is that system_rebuild_module_data() in D8 doesn't get us with fresh data after downloading the missing deps, even if we enforce a system_list_reset().

@jonhattan
Copy link
Member

Problem is exactly here: http://cgit.drupalcode.org/drupal/tree/core/lib/Drupal/Core/Extension/ExtensionDiscovery.php#n188

It won't scan again the filesystem after we downloaded the modules, and there's no method to reset this cache.

@kostajh
Copy link
Contributor

kostajh commented Jul 13, 2015

It was never broken for Drupal 7.

@jonhattan did you see my report above? try drush en logging_alerts -y in a D7 site.

@jonhattan
Copy link
Member

@kostajh, you're right. It is broken this way for any Drupal version, because of the assimetry between project names and extension names (a funny example is google_analytics). This is a won't fix until D.O. changes or someone invents something clever.

The case for Drupal 8 is different. It is broken where Drupal 7,6,5 works, as explained above.

@jonhattan
Copy link
Member

Related issue in drupal.org: https://www.drupal.org/node/2503927

@LionsAd
Copy link

LionsAd commented Jul 13, 2015

I think it would be better to open an actual major bug report instead of hoping on the conversion, which might not solve the bug after all.

@webflo
Copy link
Contributor

webflo commented Jul 14, 2015

I "fixed" the bug for DrupalConsole in hechoendrupal/drupal-console@2311c47 (last two files)

@jonhattan
Copy link
Member

I arrived to the same solution yesterday. It is pending a proper implementation within drush. http://www.pasteall.org/59559/diff

@kenorb
Copy link
Contributor

kenorb commented Sep 13, 2015

I'm using drush 8.0-dev with D7.

Here is my scenario:

$ drush -l http://foo -y en features_extra
features_extra was not found.                                                                                    
The following projects provide some or all of the extensions not found:                                          
features_extra
Would you like to download them? (y/n): y
Unknown path for spartan module.                                                                                 
Install location sites/all/modules/contrib/features_extra already exists. Do you want to overwrite it? (y/n): y
Project features_extra (7.x-1.0) downloaded to sites/all/modules/contrib/features_extra.                         
Project features_extra contains 4 modules: fe_block, fe_date, fe_nodequeue, fe_profile.
features_extra was not found.                                                                                    
The following projects provide some or all of the extensions not found:                                          
features_extra
Would you like to download them? (y/n): y
Unknown path for spartan module.                                                                                 
Install location sites/all/modules/contrib/features_extra already exists. Do you want to overwrite it? (y/n): y
Project features_extra (7.x-1.0) downloaded to sites/all/modules/contrib/features_extra.                         
Project features_extra contains 4 modules: fe_block, fe_date, fe_nodequeue, fe_profile.
features_extra was not found.                                                                                    
The following projects provide some or all of the extensions not found:                                           
features_extra
Would you like to download them? (y/n): y
Unknown path for spartan module.                                                                                  
Install location sites/all/modules/contrib/features_extra already exists. Do you want to overwrite it? (y/n): ^C

Few issues which I've found:

  • features_extra can't be found in contrib, despite it was downloaded by drush it-self
  • features_extra is depending on features_extra (it-self), probably because the sub-modules have different machines names
  • spartan can't be found, but it's actually in: ./profiles/openpublic/themes/spartan

P.S. This was actually my mistake, as I should enable fe_block (which works) instead features_extra which actually is not a valid module name, but at least it can give some ideas for improvements.

@raj45
Copy link

raj45 commented Sep 29, 2015

If I try to install a D8 module using drush 7 with drush en admin_toolbar -y, it ends in a loop. I am using vlad, which might be a factor. If I just do drush dl admin_toolbar -y and then drush en admin_toolbar -y it works fine.

✝ d8 ✝ /var/www/site/docroot/d8.dev $ drush en admin_toolbar -y
admin_toolbar was not found.                                                                                                           [warning]
The following projects provide some or all of the extensions not found:                                                                [ok]
admin_toolbar
Would you like to download them? (y/n): y
Project admin_toolbar (8.x-1.9) downloaded to /var/www/site/docroot/d8.dev//modules/admin_toolbar.                              [success]
Project admin_toolbar contains 2 modules: admin_toolbar_tools, admin_toolbar.
admin_toolbar was not found.                                                                                                           [warning]
The following projects provide some or all of the extensions not found:                                                                [ok]
admin_toolbar
Would you like to download them? (y/n): y
Install location /var/www/site/docroot/d8.dev//modules/admin_toolbar already exists. Do you want to overwrite it? (y/n): y
Project admin_toolbar (8.x-1.9) downloaded to /var/www/site/docroot/d8.dev//modules/admin_toolbar.                              [success]
Project admin_toolbar contains 2 modules: admin_toolbar_tools, admin_toolbar.
admin_toolbar was not found.                                                                                                           [warning]
The following projects provide some or all of the extensions not found:                                                                [ok]
admin_toolbar
Would you like to download them? (y/n): y
Install location /var/www/site/docroot/d8.dev//modules/admin_toolbar already exists. Do you want to overwrite it? (y/n): y

and on and on...

@bevinhex
Copy link

Same here, using the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants