Steps to reproduce:

  • Create a facet with machine name "foo" and save it
  • Edit the facet, and change the machine name to "bar"
  • The change is successfully changed, but after form submit you are redirected to "admin/config/search/facets/foo/settings", which no longer exists

The expected behavior would be to redirect to "admin/config/search/facets/bar/settings", or at least "admin/config/search/facets"

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jlicht created an issue. See original summary.

alan-ps’s picture

Version: 8.x-1.0-alpha4 » 8.x-1.x-dev
Status: Active » Needs review
FileSize
1.22 KB

I think that we should forbid changing entities' IDs (as it was done for search api index/server), because it can cause additional troubles. I've created appropriate patch for reviewing.

Status: Needs review » Needs work

The last submitted patch, 2: facets-forbid_changing_entities_ids-2763181-2.patch, failed testing.

The last submitted patch, 2: facets-forbid_changing_entities_ids-2763181-2.patch, failed testing.

borisson_’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
1.17 KB
2.22 KB

We actually have a test that checks this, we added that in #2629504: Changing a facet's machine name redirects to page not found on submit..

So that test isn't good enough. I agree with not changing the ID though. So I just removed the old test, will put this to RTBC and hold off on feedback from others before committing.

borisson_’s picture

Status: Reviewed & tested by the community » Fixed

Committed, thanks.

  • borisson_ committed 935a263 on 8.x-1.x authored by alan-ps
    Issue #2763181 by borisson_, alan-ps: Changing facet machine name sends...

Status: Fixed » Closed (fixed)

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