Problem/Motivation

In past_db there's a route definition and a local task for the extended view (/admin/reports/past/extended). But if you remove the view config object, the route definition and the local task remain, and visiting the path causes an error:

Failed to find entity of type past_event_log_key_ext_search in route named entity.past_event.extended in Drupal\Core\Entity\Enhancer\EntityRouteEnhancer->enhanceEntityView()

Proposed resolution

Remove route and local task definitions, they are supposed to be defined in the view config (only).

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Arla created an issue. See original summary.

mbovan’s picture

Status: Active » Needs review
StatusFileSize
new5.73 KB

This patch should fix the error.

mbovan’s picture

StatusFileSize
new951 bytes
new5.87 KB

Support for translatable menu item.

edurenye’s picture

Status: Needs review » Needs work

I think we can add that if is there is the extended view but not the standard view, then the menu still appears but leading to the extended view.
For the rest looks perfect!

mbovan’s picture

Status: Needs work » Needs review
StatusFileSize
new3.12 KB
new9.06 KB
new4.19 KB

Implemented the suggestion from @edurenye and added tests.

The last submitted patch, 5: remove_hardcoding_of-2614124-5-TEST-ONLY.patch, failed testing.

berdir’s picture

Status: Needs review » Fixed

Nice, committed.

  • Berdir committed b1b9768 on 8.x-1.x authored by mbovan
    Issue #2614124 by mbovan: Remove hardcoding of Past DB extended view...

Status: Fixed » Closed (fixed)

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

edurenye’s picture

Status: Closed (fixed) » Needs work

Now we have to remove the rebuilds in PastDBTest::testViews and the @todo messages as this issue #2596345: Deleting a view should rebuild the routes is fixed, not sure if here or in a followup.

edurenye’s picture

Status: Needs work » Needs review
StatusFileSize
new1.11 KB

Removed here.

berdir’s picture

Status: Needs review » Fixed

Thanks, committed.

  • Berdir committed b301ae7 on 8.x-1.x authored by edurenye
    Issue #2614124 by mbovan, edurenye: Remove hardcoding of Past DB...

Status: Fixed » Closed (fixed)

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