entity.flag.enable:
  path: '/flag/enable/{flag}'

This path means that when you go to enable a flag, you switch to the site theme. We could fix this by adding code to declare this path as an admin path, but I think it's simpler to change the path to /admin/structure/flags/manage/{flag}/enable -- which is where I'd have expected this path to be.

Same applies to disable and reset.

Postponed until #2564461: rationalize & clean up test classes is resolved, as this requires changes to tests.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim created an issue. See original summary.

joachim’s picture

Status: Postponed » Active
joachim’s picture

Status: Active » Needs review
FileSize
3.01 KB
socketwench’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll
joachim’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
3.03 KB

Ah, this is another reason keeping issue work on a local branch is great -- git rebase, run patch script, done! :)

socketwench’s picture

Status: Needs review » Reviewed & tested by the community

The tests all pass in the WebUI. When I ran the tests via the CLI, however, an error popped up:

Fatal error: Call to a member function id() on null in /var/www/modules/flag/src/Tests/FlagTestBase.php on line 206
FATAL Drupal\flag\Tests\AdminUITest: test runner returned a non-zero error code (255).
Drupal\flag\Tests\AdminUITest                                  0 passes   1 fails                            
- Found database prefix 'simpletest950557' for test ID 1.
[05-Dec-2015 04:06:34 UTC] PHP Fatal error:  Call to a member function id() on null in /var/www/modules/flag/src/Tests/FlagTestBase.php on line 206

I've created #2629344: Null flag object passed to FlagTestBase::grantFlagPermissions(). for the other error.

joachim’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

  • joachim committed 834bbfb on 8.x-4.x
    Issue #2581505 by joachim: Changed flag operations to be on admin paths.
    

Status: Fixed » Closed (fixed)

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