The configuration import form does not tell users that the files they upload must be *.tar.gz files. It also uses words like tarball which may mean nothing to people and are irrelevant in this context, and, depending on the uploaded file, even wrong.

Files: 
CommentFileSizeAuthor
#31 interdiff.txt616 bytespguillard
#31 drupal-improve_wording_of_config_import_form-2203779-31.patch2.61 KBpguillard
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 97,146 pass(es). View
#29 interdiff.txt616 bytespguillard
#29 drupal-improve_wording_of_config_import_form-2203779-29.patch1.91 KBpguillard
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 97,055 pass(es). View
#27 drupal-improve_wording_of_config_import_form-2203779-27.patch906 bytespguillard
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal-improve_wording_of_config_import_form-2203779-27.patch. Unable to apply patch. See the log in the details link for more information. View
#1 drupal_2203779_1.patch2.02 KBXano
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal_2203779_1.patch. Unable to apply patch. See the log in the details link for more information. View
#21 interdiff-2203779-10-21.txt650 bytesivanstegic
#21 drupal-improve_wording_of_config_import_form-2203779-21.patch2.6 KBivanstegic
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 97,048 pass(es). View

Comments

Xano’s picture

FileSize
2.02 KB
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal_2203779_1.patch. Unable to apply patch. See the log in the details link for more information. View
Xano’s picture

Status: Active » Needs review
jhodgdon’s picture

Component: configuration system » config.module
Issue tags: +Usability

This is config.module (the config management UI), not configuration system generically.

jhodgdon queued 1: drupal_2203779_1.patch for re-testing.

Status: Needs review » Needs work

The last submitted patch, 1: drupal_2203779_1.patch, failed testing.

Prashant.c’s picture

Status: Needs work » Needs review
Issue tags: +#dcdelhi
FileSize
1.63 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 83,569 pass(es). View

Submitting patch with minor changes.

jhodgdon’s picture

Status: Needs review » Needs work

Thanks for the patches!

The patch in #6 is not really OK. It changes the top-of-page description in a way that, without the changes that were in the patch in #1, gives duplicate information on the form. And it misses important changes in #1.

So, I went back to the patch in #1 and reviewed that.

-      '#markup' => '<p>' . $this->t('Use the upload button below.') . '</p>',
+      '#markup' => '<p>' . $this->t('This form will redirect you to the import configuration screen.') . '</p>',

I think we should just remove this description at the top of the form. Our UI guidelines tell us that we should not be telling people how to use a UI, and the description there is not providing any useful information, either in its text without the patch, or I think in either of the patches -- the proposed text here I think is confusing because you are already at the Import form, and really where you get sent is Synchronize. We really don't need this text, especially since it doesn't illuminate anything, so please just remove it.

Also the proper place to put help text, if a longer description is needed, is the hook_help() implementation in config.module. Actually, there is not currently any help block for this page. I think there probably should be, and it should explain that you're uploading and extracting an archive of config in gzipped format, into your staging area, after which you'll be redirected to the Synchronize page where you can actually import your configuration. This seems important to provide help on.

The next change:

+      '#title' => $this->t('Configuration export file'),
+      '#description' => $this->t('This must be a <em>*.tar.gz</em> file.'),

Does it really have to be .tar.gz or can it also be a .tgz file? Maybe it would be better to say "Must be in gzipped tar format"?

tim.plunkett’s picture

I hit this during a live demo, I tried to upload both a zip and a non-gzipped tar, and got this message:

Could not extract the contents of the tar file. The error message is

No I didn't copy that wrong, it just ends there.

The exception from ArchiveTar is actually this (can't even paste it on d.o, it gets eaten)
http://take.ms/W68Ur

ivanstegic’s picture

Assigned: Unassigned » ivanstegic

Assigning it to myself, discussing with peers IRL and hope to contribute some work.

ivanstegic’s picture

FileSize
2.04 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 95,274 pass(es). View
42.55 KB

@Les Lim, @lexfunk, @JackProbst, @ColemanRollins, @jascote, @tiffdmoore and I talked through the wording on this form, and came up with something that we think makes sense and addresses the concerns. We went ahead and changed the area in the markup in lieu of removing it completely, if you think it should be removed after seeing this implementation, I'll re-roll the patch.

In markup area we think it could read:

Use the form to upload a package of Drupal 8 configuration files. After submitting, you will be redirected to the import configuration screen.

The title of the file could more accurately describe the file as:

Configuration file package

With a description of:

You must upload a file of type tar.gz.

It might look something like the attached screenshot.
D8 Import with new verbiage

Rolled a patch that includes changes to the error verbiage from #6, and tested it to work locally.

xjm’s picture

Status: Needs work » Needs review

Setting Needs Review so that the automated testing infrastructure will test it. Thanks @ivanstegic for helping with this!

xjm’s picture

Issue tags: +Configuration system
ivanstegic’s picture

Oops, sorry @xjm I forgot to change the status. And yes, you're welcome on the help... we're planning on contributing on a more regular basis as a group! Huzzah!

jhodgdon’s picture

Question on the screenshot: does the form accept .tgz files as well as .tar.gz? The text that is there implies it does not.

Also, nitpick: Normally .tar.gz files are called "archives" not "packages", aren't they? And why not use the description similar to what you get for File uploads usually?

Another nitpick: "After submitting, the form will redirect you to the import configuration screen"... So, when I read this I though "hm, it's redirecting me to a place where I can configure my imports?"... but that's not right. And the grammar is a bit odd...

And another note: normally explanatory text at the top of the page is provided by hook_help(), we shouldn't be repeating things that are obvious from the UI, and we shouldn't use the word Drupal. [See UI text standards page: https://www.drupal.org/node/604342 ]

So my suggestion for the UI text would be:

top of page [if this is accurate, and put it into hook_help()]:

After uploading a configuration archive here, you will be able to examine the changes and import them on the next page.

field title:
Configuration archive

field description:
Allowed file types: .tar.gz .tgz
[Use the exact t() line from the File field so that it doesn't have to be translated again and so it's uniform]

jhodgdon’s picture

Status: Needs review » Needs work

Sorry, forgot to say THANK YOU for working on this!!!

cilefen’s picture

@jhodgdon By looking at ConfigImportForm and ConfigImportUploadTest it would seem any file name may be allowed as long as it is a gzipped tar archive.

jhodgdon’s picture

OK, well those would be the standard extensions for a gzipped tar archive, .tgz and .tar.gz. I do not think we will be far from the truth if we say the file needs to have one of those two extensions. ;)

Les Lim’s picture

This would be the t() line with the reused string, btw:

t('Allowed types: @extensions.', array('@extensions' => 'tar.gz tgz'));
ivanstegic’s picture

Status: Needs work » Needs review
FileSize
2.61 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 95,673 pass(es). View
1.73 KB

Made the suggested changes to the form, including the hook_help(). We also changed your verbiage somewhat, simply removed "on the next page" from the end of the help info because there really is no next page, it's the same page.

jhodgdon’s picture

This looks great! One minor suggestion:

+++ b/core/modules/config/config.module
@@ -24,6 +24,11 @@ function config_help($route_name, RouteMatchInterface $route_match) {
+      $output .= '<p>' . t('After uploading a configuration archive here, you will be able to examine the changes and import them.') . '</p>';

Removing "on the next page" was good. Maybe also remove "here" in this line?

ivanstegic’s picture

FileSize
2.6 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 97,048 pass(es). View
650 bytes

Here's the rerolled patch, and a new interdiff. Good idea to remove "here", that makes more sense. Is there anything else that needs to be done?

ivanstegic’s picture

Oh dear, the file interdiff file was supposed to be named -19-21.txt not -10.21.txt, sorry about that.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

This all looks good to me, thanks! Sorry, I've been a bit slow about reviews lately.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

This is looking way more helpful. Nice.

+++ b/core/modules/config/src/Form/ConfigImportForm.php
@@ -55,13 +55,10 @@ public function getFormId() {
+      '#description' => $this->t('Allowed types: @extensions.', array('@extensions' => 'tar.gz tgz')),

Reading Drupal\Core\Archiver\ArchiveTar it looks like we also support tar.bz2 afaics

pguillard’s picture

FileSize
906 bytes
FAILED: [[SimpleTest]]: [PHP 5.4 MySQL] Unable to apply patch drupal-improve_wording_of_config_import_form-2203779-27.patch. Unable to apply patch. See the log in the details link for more information. View

I applied suggestions at #26, and had to reroll the patch at #21, some of its content seem to have been committed already.

alexpott’s picture

I included it by mistake in http://cgit.drupalcode.org/drupal/commit/?id=3700144. I reverted and re-committed #2505521: Clean-up un-need test classes in migrate_drupal so we'll need redo #27. I'm sorry for the confusion and my mistake.

pguillard’s picture

Assigned: ivanstegic » Unassigned
Status: Needs work » Needs review
FileSize
1.91 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 97,055 pass(es). View
616 bytes

No problem @Alex
#21 with suggestion at #26

jhodgdon’s picture

Status: Needs review » Needs work

There is also a comprehensive UI overhaul of Config Import on #2247291: Reorder tabs in configuration UI. The changes here will need to make it onto that issue.

Regarding the latest patch, it doesn't contain everything from the patch in #21 (missing the hook_help() piece). Seems like that needs to be added back in? The rest looks good...

pguillard’s picture

FileSize
2.61 KB
PASSED: [[SimpleTest]]: [PHP 5.4 MySQL] 97,146 pass(es). View
616 bytes

Thanks @jhodgdon. I do not know what happened to me!
Just corrected that error.

pguillard’s picture

Status: Needs work » Needs review

Eli-T’s picture

Changes of the patch in https://www.drupal.org/node/2203779#comment-10047104 copied to https://www.drupal.org/node/2247291#comment-10047824, with the exception of the hook_help() change for config.sync as in #2247291 this page no longer exists.

I'll continue to watch this issue in case further changes are made.

jhodgdon’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me now, thanks!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This issue is a prioritized change as per https://www.drupal.org/core/beta-changes because it is focussed on usability and its benefits outweigh any disruption. Committed faa07d7 and pushed to 8.0.x. Thanks!

  • alexpott committed faa07d7 on 8.0.x
    Issue #2203779 by ivanstegic, pguillard, Xano, Prashant.c, jhodgdon:...
ivanstegic’s picture

Hooray! This is our first core patch!

@Jennifer can I give you a hug for all the review and help while you're here in Minneapolis for camp?

@alexpott do you remember at DrupalCon LA when I said we'd be working on issues in the CMI queue on Fridays? Well, this is the fruit of that labor.

jhodgdon’s picture

@invastegic: Definitely! I'll be there starting tomorrow around noon, and plan to spend most of my time in the sprint room getting ready for the Sunday sprint on the User Manual:
https://groups.drupal.org/node/471268
Joe and I have to get an outline, instructions, and guidelines together and we have 2.5 days to do it... should be fun! Anyway, hugs are always a good idea. ;)

Status: Fixed » Closed (fixed)

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