Problem/Motivation

The links on admin/structure/display-modes/view point to the wrong path, so you always have to use the local action and select the entity type
instead of clicking on the entity type specific links.

Proposed resolution

Remaining tasks

User interface changes

API changes

Comments

unstatu’s picture

This patch should fix the link

unstatu’s picture

Status: Active » Needs review
dawehner’s picture

Issue tags: +Needs tests

It would be great to have some basic test coverage here.

keopx’s picture

Status: Needs review » Reviewed & tested by the community

Hi,

Tested and works fine :)

alexpott’s picture

Status: Reviewed & tested by the community » Needs work

Can we add an automated test - thanks!

swentel’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
StatusFileSize
new687 bytes
new1.29 KB

Added test + simplified the str_replace. Interdiff is pretty much useless.

The last submitted patch, 6: 2332709-6-fail.patch, failed testing.

dawehner’s picture

+++ b/core/modules/entity/src/Tests/EntityDisplayModeTest.php
@@ -35,6 +35,7 @@ public function testEntityViewModeUI() {
     $this->assertLinkByHref('admin/structure/display-modes/view/add');
+    $this->assertLinkByHref('admin/structure/display-modes/view/add', 1);

So the bug for me was that for example "admin/structure/display-modes/view/add/node" was
"admin/structure/display-modes/entity_view/add/node" so this test seems not a proper one?

swentel’s picture

I see what you mean, but in the end we don't really care here whether the entity type is ok, we're testing whether 'entity_view_mode' becomes 'view'. I could change the test to assert for admin/structure/display-modes/view/add/entity_test_mulrev though if you want.

swentel’s picture

StatusFileSize
new1.3 KB
new778 bytes

With different assert now.

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

Well right you ensure that the bug is fixed, but it would be also cool if it would actually work! Thanks for providing a good fix!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 2332709-10.patch, failed testing.

swentel’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.3 KB
new787 bytes

oh bah

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed db6bd07 and pushed to 8.0.x. Thanks!

  • alexpott committed db6bd07 on 8.0.x
    Issue #2332709 by swentel, unstatu | dawehner: Fixed Link to add a view...

Status: Fixed » Closed (fixed)

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