Problem/Motivation

I cannot save the FTP settings when trying to install a module from the UI (with both url and tarball module)
See attached picture.

Ok after a first check it appears that the button is just hidden and don't show up when it should. But once the button shown, give the settings a working account and FTP server, I'm redirecting to the error page with no information.

By the way, I only see "FTP" in the select list, is there any way to choose to upload by SFTP & SSH?

How to reproduce

Install a new module from the administration
Fill the form for the FTP connection
Display the "Continue" button with the console
Cry

Proposed resolution

Need to fix the show/hide of the continue button
Need to fix the upload actually not working

Remaining tasks

Fixing the hide/show on the "Continue" button.
Inspect the FTP connection with fresh settings throwing an exception without error messages.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

myforgedoteu’s picture

Issue summary: View changes
myforgedoteu’s picture

Assigned: Unassigned » myforgedoteu
catch’s picture

Component: extension system » update.module
Devin Carlson’s picture

Status: Active » Needs review
FileSize
7.55 KB

Confirmed that the button is hidden by a rule in system.maintenance.css introduced in #1574484: Selectors clean-up: authorize.js.

/**
 * Authorize.php styles
 */
#edit-submit-process,
.filetransfer {
  display: none;
  clear: both;
}

Attempting to duplicate the problem with tests, though I also ran into other issues with update.module and have tried to add test coverage for those bugs as well.

Status: Needs review » Needs work

The last submitted patch, 4: add-update-modules-2353335-4-tests-only.patch, failed testing.

catch’s picture

Devin Carlson’s picture

Moving the other problems into separate issues.

It looks like the core issue here is related to #2376147: Installer is missing all of the global Seven theme stylesheets. The core/drupal.states library is not being added to the page so the JS files that make up the States API are missing, resulting in the form elements being hidden.

The attached patch conflicts with the related issue but demonstrates the problem.

The last submitted patch, 7: authorize-missing-library-2353335-7-tests-only.patch, failed testing.

Status: Needs review » Needs work

The last submitted patch, 7: authorize-missing-library-2353335-7.patch, failed testing.

Devin Carlson’s picture

Wim Leers’s picture

Status: Needs review » Needs work
+++ b/core/modules/system/system.module
@@ -526,6 +526,7 @@ function system_filetransfer_info() {
+  $page['#attached']['library'][] = 'core/drupal.states';

This is wrong; it should not be attached via hook_page_attachments(), because this causes this library to be attached on all pages.

If #states is used in FileTransferAuthorizeForm, then this library should be attached there.

The last submitted patch, 10: authorize-missing-library-2353335-10-tests-only.patch, failed testing.

The last submitted patch, 10: authorize-missing-library-2353335-10.patch, failed testing.

Wim Leers’s picture

This was implicitly broken by #2273277: Figure out a solution for the problematic interaction between the render system and the theme system when using #pre_render.

Fix attached.

The problem was that #attached essentially was thrown away, because it's rendered very early and then just a string of HTML is passed in for final rendering… which doesn't know about the needed attached assets!

Wim Leers’s picture

FileSize
3.66 KB
763 bytes

One bit of cleanup for #14.

Devin Carlson’s picture

Status: Needs review » Reviewed & tested by the community

The changes in #15 look good and fixed the issue in my testing.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes. Committed b6c1c2f and pushed to 8.0.x. Thanks!

  • alexpott committed b6c1c2f on 8.0.x
    Issue #2353335 by Devin Carlson, Wim Leers, myforgedoteu: module install...

Status: Fixed » Closed (fixed)

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