When doing a simple config import, say 'system.site', the confirm form will ask you if it wants to create a new one, even though system.site clearly exists.
It should ask for 'update' instead.

Files: 
CommentFileSizeAuthor
#3 2150171.3.patch2.24 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 59,335 pass(es). View
#3 2150171.3.test-only.FAIL_.patch1.55 KBalexpott
FAILED: [[SimpleTest]]: [MySQL] 59,252 pass(es), 2 fail(s), and 0 exception(s). View
#1 2150171-1.patch797 bytesswentel
PASSED: [[SimpleTest]]: [MySQL] 59,314 pass(es). View

Comments

swentel’s picture

Status: Active » Needs review
FileSize
797 bytes
PASSED: [[SimpleTest]]: [MySQL] 59,314 pass(es). View
alexpott’s picture

Issue tags: +Needs tests

Have not confirmed the bug but we obviously need tests :)

alexpott’s picture

FileSize
1.55 KB
FAILED: [[SimpleTest]]: [MySQL] 59,252 pass(es), 2 fail(s), and 0 exception(s). View
2.24 KB
PASSED: [[SimpleTest]]: [MySQL] 59,335 pass(es). View

Confirmed the issue - added tests and fixed in a slightly different way as the fix in #1 since that fix did not meet the expectation laid out by the docs in the class.

  /**
   * If the config exists, this is that object. Otherwise, FALSE.
   *
   * @var \Drupal\Core\Config\Config|\Drupal\Core\Config\Entity\ConfigEntityInterface|bool
   */
  protected $configExists = FALSE;

The last submitted patch, 3: 2150171.3.test-only.FAIL_.patch, failed testing.

swentel’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests

Right, much better fix, duh :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Awesome, thanks. I caught this today too in my testing.

Committed and pushed to 8.x. Thanks!

swentel’s picture

Status: Fixed » Reviewed & tested by the community

I think you forgot to push this one

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Oh, what, is that important or something? ;)

Sorry. Pushed this time.

Status: Fixed » Closed (fixed)

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