As I just looked into Update module for a design I am doing, I was struck by the unavailability of installing several modules. Where as you can update several modules, you can't install several modules? This seems a bit odd, and should probably considered a bug - since it prohibits a very if not 85% usecase of this functionality, of installing a bunch of modules at site-setup.

Marking this critical for now, is this an oversight when we reviewed this piece of functionality? Dww noted that this is probally not to hard.

Comments

Bojhan’s picture

Version: 7.x-dev » 8.x-dev

Since there has absolutely been no activity on this issue, I wrongly assumed it was important enough.

dww’s picture

Title: Unable to install multiple modules » Allow ability to install multiple modules
Category: bug » feature
Priority: Critical » Normal
David_Rothstein’s picture

Title: Allow ability to install multiple modules » Allow ability to install multiple modules at once
marcingy’s picture

Status: Active » Closed (duplicate)

Marking this as a duplicate of http://drupal.org/node/720452 simply because the other issue has mockups for UI changes.

David_Rothstein’s picture

Status: Closed (duplicate) » Active

That link points to this issue... :)

marcingy’s picture

Doh bad cut and paste should be - http://drupal.org/node/1181948

LarsKramer’s picture

Subscribing.

BTW: Shouldn't the tag "D7UX" be removed or changed to something else since the version is now 8.x-dev?

marcingy’s picture

Status: Active » Closed (duplicate)

This is duplicate as detailed above I just referenced the wrong issue when I closed it and as a result it got reopened closing for real this time (hopefully). And to make it clear http://drupal.org/node/1181948 is the item it is a dup of

LarsKramer’s picture

@marcingy: Now I am getting confused. The issue you are pointing to, is also marked "Closed (duplicate)" and pointing to this one.

marcingy’s picture

My bad sorry I didn't realise the other issue had been closed (note to slef always click on the link when you last looked at the issue a month and half ago!) - I have reopened the other issue as it has initial concept for gui which I think will be benefical to help drive this forward

LarsKramer’s picture

Status: Closed (duplicate) » Active

Reopening.

@marcingy: when referencing other isssues, you can use this syntax: [#issue_number] which makes it easier to read the link. This option is described in the formatting tips below your editor window.

deryck.henson’s picture

This issue is still not addressed or assigned to anyone. Is this going to be discarded or do we have a plan to change it?

marcingy’s picture

@deryck.henson if you are interested in the feature why not write a patch, otherwise you just have to hope someone comes along who wants to scratch this particular itch.

benjifisher’s picture

Status: Active » Needs review
StatusFileSize
new64.42 KB
new64.49 KB
new514 bytes

The attached patch does not do what the issue requested, but it is an easy step in the direction of making it easier to install multiple modules. After filling out this form at admin/modules/install

the user (administrator) is redirected to this confirmation page:

My little patch adds the middle option, "Install another module", which returns to admin/modules/install.

jesse.d’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

Bojhan’s picture

Oh, I imagined the textbox, would be a text area, and you could put in several url's seperated by enter or comma.

benjifisher’s picture

@Bojhan:

Understood. My formatting in #14 may be hard to read because of the screen shots, but I wrote

The attached patch does not do what the issue requested, but it is an easy step in the direction of making it easier to install multiple modules.

Perhaps I should have opened a new issue ...

Bojhan’s picture

No I think this is the right place, perhaps though - you could add the original intend to your patch? :D No reason we can't do both solutions.

benjifisher’s picture

Assigned: Unassigned » benjifisher
Status: Reviewed & tested by the community » Needs work

@Bojhan:

All right, I will give it a try. It is more complicated than you might think if you have not looked at the code. I have already submitted one documentation patch while looking into this: #1827200: system_authorized_init() has inconsistent documentation.

benjifisher’s picture

Status: Needs work » Needs review
StatusFileSize
new240 bytes
new239 bytes
  1. When processing the textarea, I use explode("\n", ...). If it is good enough for update_settings_validate(), it is good enough for me.
  2. I remove the lines
        // Make sure the Updater registry is loaded.
        drupal_get_updaters(); 

    The line

        $updater = Updater::factory($project_location); 

    calls Updater::getUpdaterFromDirectory(), and this calls drupal_get_updaters().

  3. Compare the updated update_authorize_run_install() to update_manager_update_form_submit().
  4. There are a few things I do not like about the code, but a serious clean-up should be done (if at all) as a separate issue. Why is there so much validation code (calls to form_set_error()) in the submit function? Why isn't the install code more similar to the update code? (I would be happier if they had similar validate and submit functions, but install downloads projects to the temp directory in the submit function whereas update does it in a function called through the Batch API.)
  5. If there is only one project, and it is already installed, then I flag it as an error, as in the original code. If some, but not all, projects are already installed, then I just issue a warning.
  6. If all of the projects are already installed, then the form reloads with the text area blanked out. Is this my fault, or did it behave that way before?
  7. Maybe my fault: in testing, I often get the message Archivers can only operate on local files: temporary://update-cache-bc42cf97/object_log-8.x-1.x-dev.tar.gz not supported. Try again, and it works.
  8. I think I was getting this error before I started messing with the code:
        An error has occurred.
        Please continue to the error page
    
        An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://drupal8.localhost:8082/core/authorize.php?batch=1&id=9&op=do_nojs&op=do StatusText: OK ResponseText: Fatal error: Class name must be a valid object or a string in /Users/benji/Sites/drupal8/core/modules/update/update.authorize.inc on line 159
      

    Follow the "error page" link, and it works.

dww’s picture

Status: Needs review » Needs work

The patches in #20 are basically empty. Please re-post with actual code to review. ;)

Note that the patch from #14 is duplicate with #1446650: After installing module display link to "install another module". So yeah, if that's all we want, let's do that over there.

Let's leave this issue specifically for what the title here says: "Allow ability to install multiple modules at once"

Thanks!
-Derek

benjifisher’s picture

Status: Needs work » Needs review
StatusFileSize
new8.63 KB
new11.61 KB

@dww:

Multiple thanks! It looks as though I generated patches using git diff --stat. D'oh! And I did not find #1446650, even though I looked for such an issue before posting here (#14).

Second try: I have attached two patches, leaving off the part that duplicated #1446650. Same reason as before for submitting two versions of the patch.

Status: Needs review » Needs work

The last submitted patch, install-modules-720452-22.patch, failed testing.

benjifisher’s picture

Take three: remove dsm() ...

benjifisher’s picture

Status: Needs work » Needs review

Take four: set the issue status back to NR ...

Status: Needs review » Needs work

The last submitted patch, install-modules-720452-24.patch, failed testing.

benjifisher’s picture

Status: Needs work » Needs review
StatusFileSize
new8.63 KB
new11.74 KB

Nice catch, testbot! Fixed problems, ran the tests locally, remembered to set status to NR. Take five!

I guess I should also add to the tests. Not right now.

Status: Needs review » Needs work
Issue tags: -Usability, -D7UX

The last submitted patch, install-modules-720452-27.patch, failed testing.

benjifisher’s picture

Status: Needs work » Needs review

#27: install-modules-720452-27.patch queued for re-testing.

Status: Needs review » Needs work
Issue tags: +Usability, +D7UX

The last submitted patch, install-modules-720452-27.patch, failed testing.

benjifisher’s picture

Status: Needs work » Needs review

Looks like a glitch in the test bot. When the glitch was fixed, the test was re-run, but the status was stuck at NW.

Bojhan’s picture

Could this get some screenshots?

benjifisher’s picture

StatusFileSize
new53.2 KB
new124.91 KB
new53 KB

admin/modules/install with the new textarea:
screen shot of patched admin/modules/install


Full disclosure: I get this error message. I am pretty sure that I get a similar error without my patch.
AJAX error page


Confirmation page: I think the error is related to the AJAX problem, not my patch.
 skip one, install two

benjifisher’s picture

StatusFileSize
new30.67 KB
new127.26 KB
new40.17 KB

I meant to point out that the confirmation page shows the extra link (Install another module) added by #1446650: After installing module display link to "install another module".

The attached screen shots show that the AJAX error page is, as I said, not related to my patch. Unfortunately, when I go on to the final confirmation page, it is clean, so I cannot be sure that the htmlspecialchars() error is unrelated.

benjifisher’s picture

@Bojhan:

It has been more than a week since you asked for screen shots and I supplied them.

Bojhan’s picture

@benjifisher Sorry, I have a lot of updates in my queue. This looks good! Needs code review, I'd guess?

benjifisher’s picture

@Bojhan:

Yes, it certainly needs code review. But also see my comments in #20 and review the wording of my status/warning/error messages.

For anyone reviewing the code: the patch in #27 is the one to test. The do-not-test version of the patch was generated using git diff -w in order to leave out all the lines that got re-indented.

barnettech’s picture

Status: Needs review » Needs work

Starting to go through the code,

I notice first that the doxygen needs updating since you changed variable names:

/**
 * Installs a new project when invoked by authorize.php.
 *
 * Callback for system_authorized_init() in
 * update_manager_install_form_submit().
 *
 * @param FileTransfer $filetransfer
 *   The FileTransfer object created by authorize.php for use during this
 *   operation.
 * @param string $project
 *   The canonical project short name; i.e., the name of the module, theme, or
 *   profile.
 * @param string $updater_name
 *   The name of the Drupal\Core\Updater\Updater class to use for installing
 *   this project.
 * @param string $local_url
 *   The URL to the locally installed temp directory where the project has
 *   already been downloaded and extracted into.
 */
function update_authorize_run_install($filetransfer, $project_data) {

the variables in doxygen don't match the actual variable names in use any longer. Just run the patched file through codesniffer you'll see lots of the doxygen needs updating, not just the excerpt listed above.

benjifisher’s picture

StatusFileSize
new13.24 KB

@barnettech:

Thanks for checking! I think the attached patch fixes the doc blocks in all the functions I changed.

CodeSniffer caught a problem in another function. I am not sure of the right fix, so I opened a separate issue: #1863388: syntax error in update_manager_update_form().

While updating the doc block for update_authorize_run_install(), I modeled it on the doc block for update_authorize_run_update(). Now that the install code deals with multiple URL's, it is very similar to the update code. I changed the variable names to make the similarity more obvious. See my comment in #20(4) above: if someone wants to clean up this code, then I will have done him or her a small favor.

benjifisher’s picture

Status: Needs work » Needs review

Forgot to change the status ...

Status: Needs review » Needs work

The last submitted patch, install-modules-720452-39.patch, failed testing.

benjifisher’s picture

Status: Needs work » Needs review

I ran all of the Upgrade path tests locally, and ran UserRoleUpgradePathTest a second time for good measure. I will ask the test bot to reconsider.

benjifisher’s picture

Issue tags: -Usability, -D7UX

#39: install-modules-720452-39.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, install-modules-720452-39.patch, failed testing.

benjifisher’s picture

Status: Needs work » Needs review
Issue tags: +Usability, +D7UX

#39: install-modules-720452-39.patch queued for re-testing.

Chasen’s picture

Was just about to post a feature request about this but found http://drupal.org/node/1012850 which directed me here.

Even if not given the ability to install X modules at once (i.e. a bulk install), it would still be nice to have the "Install another module" option on the Update manager "Next Steps" section.

Subscribing

benjifisher’s picture

@Chasen:

If you try out the patch and it works for you, then please change the status to RTBC and indicate in the comments whether you have tested, reviewed the code, or both.

Thanks for mentioning #1012850: Add "install another new module" link to "Next steps" after a new module has been installed. I marked it as a duplicate.

jay.chen’s picture

There is a D7 module to quickly install multiple projects or the missing dependency projects at once.
See the quick update module: https://drupal.org/project/quickupdate
And also a D8 module for it will be coming soon.

jhedstrom’s picture

Issue summary: View changes
Status: Needs review » Needs work
Issue tags: +Needs reroll
nitesh sethia’s picture

Assigned: benjifisher » Unassigned
Status: Needs work » Needs review
Issue tags: -Needs reroll +#drupalgoa2015
StatusFileSize
new16.94 KB

Rerolled the patch.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Steven Brown’s picture

Version: 8.6.x-dev » 8.7.x-dev

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.9 was released on November 6 and is the final full bugfix release for the Drupal 8.7.x series. Drupal 8.7.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.8.0 on December 4, 2019. (Drupal 8.8.0-beta1 is available for testing.)

Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: +Needs Review Queue Initiative

This issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge require as a guide.

Wonder if this was a D7 issue only?

Know in D8 - D10 I can download multiple modules at once and on can install multiple modules at once.

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Since there hasn't been a follow up going to close out for now. If still a valid request please reopen, probably updating issue summary.