The export configuration functionality provided at admin/config/development/export doesn't work when Drupal is installed in a subdirectory of document root (e.g. mysite.com/drupal/).

Configuration export button form action path is now set to absolute path starting with '/':

$form['#action'] = '/admin/config/development/export-download';
File: core/modules/config/lib/Drupal/config/Form/ConfigExportForm.php

The form action path should start with base_path().

Files: 
CommentFileSizeAuthor
#15 export-2017019-15.patch4.01 KBtim.plunkett
PASSED: [[SimpleTest]]: [MySQL] 58,073 pass(es).
[ View ]
#15 interdiff.txt2.3 KBtim.plunkett
#12 configuration-export-action-path-fix-2017019-12.patch4.05 KBvaldo
PASSED: [[SimpleTest]]: [MySQL] 57,964 pass(es).
[ View ]
#8 configuration-export-action-path-fix-2017019-8.patch3.61 KBvaldo
PASSED: [[SimpleTest]]: [MySQL] 57,980 pass(es).
[ View ]
#5 configuration-export-action-path-fix-2017019-5.patch1.46 KBamateescu
FAILED: [[SimpleTest]]: [MySQL] 57,377 pass(es), 1 fail(s), and 0 exception(s).
[ View ]
#5 interdiff.txt1.47 KBamateescu
#1 configuration-export-action-path-fix-2017019-1.patch734 bytesvaldo
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new734 bytes
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

Patch to fix this issue attached.

Status:Needs review» Needs work

Nope, it's just the leading '/' that should be removed.

Issue tags:+Configuration system

tag

I have no idea what I'm talking about, but why isn't that $form_state['redirect'] in the submitForm()?

Issue tags:+Needs tests
StatusFileSize
new1.47 KB
new1.46 KB
FAILED: [[SimpleTest]]: [MySQL] 57,377 pass(es), 1 fail(s), and 0 exception(s).
[ View ]

Fixed all that and added some docs, but we still need tests for this.

Issue tags:-Needs tests

I started working on the test for the export functionality bug but then I have run into this issue: #2017859: Permissions export configuration and import configuration are used in config.routing.yml but not implemented
I have attached a patch there as well so please take a look if you get a chance.

I noticed there is no test for the Export UI at all yet, I'll try to write it.

Issue tags:+Needs tests

Accidentally removed the "Needs tests" tag.

Status:Needs work» Needs review
StatusFileSize
new3.61 KB
PASSED: [[SimpleTest]]: [MySQL] 57,980 pass(es).
[ View ]

I have written a basic test for the export UI, patch is attached, it checks browser response and the archive file contents. It includes also the changes from the patch above.

This patch depends on #2017859: Permissions export configuration and import configuration are used in config.routing.yml but not implemented because we are using permission 'export configuration', so the test will fail while that permission is not implemented.

Status:Needs review» Needs work
Issue tags:-Needs tests, -Configuration system

The last submitted patch, configuration-export-action-path-fix-2017019-8.patch, failed testing.

Status:Needs work» Needs review
Issue tags:+Needs tests, +Configuration system

The test has passed after #2017859: Permissions export configuration and import configuration are used in config.routing.yml but not implemented got commited. Can you please review/commit this patch as well?

StatusFileSize
new4.05 KB
PASSED: [[SimpleTest]]: [MySQL] 57,964 pass(es).
[ View ]

Patch updated:
- Added test: Assert that the downloaded archive file contents are the same as the test site active store.
- Added blank line ending to the test file.

Status:Needs review» Reviewed & tested by the community

Awesome! RTBC if the bot comes back green.

Test green, ready to go.

Issue tags:-Needs tests
StatusFileSize
new2.3 KB
new4.01 KB
PASSED: [[SimpleTest]]: [MySQL] 58,073 pass(es).
[ View ]

Fixed some doc/code standards, no code changes.

valdo - thanks for adding the test checks i asked for :-) this looks RTBC to me.

Status:Reviewed & tested by the community» Fixed

Committed e997ce7 and pushed to 8.x. Thanks!

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