Problem/Motivation

Split from #3483304: Add support for disabling a route for a node-type

NodeViewController only contains 2 methods - view and title.

::view delegates immediately to the parent and contains no additional logic.
::title does the effective equivalent of EntityController::title

We can effectively swap to use EntityViewController directly, therefore removing NodeRouteProvider::getCanonicalRoute

In fact, I'm not even sure if NodeViewController::title is used anywhere since NodeRouteprovider doesn't override the default _title_callback

Steps to reproduce

N/A

Proposed resolution

Deprecate NodeViewController entirely
Remove NodeRouteProvider::getCanonicalRoute override

Remaining tasks

User interface changes

None

Introduced terminology

None

API changes

NodeViewController deprecated

Data model changes

None

Release notes snippet

None

Issue fork drupal-3589630

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

acbramley created an issue. See original summary.

acbramley’s picture

Issue tags: +DrupalSouth 2026
acbramley’s picture

Status: Active » Needs review
larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Reviewed the change record and the code, this looks good to me

alexpott’s picture

We stopped using NodeViewController::title in #2723579: NodeRouteProvider should extend DefaultHtmlRouteProvider

alexpott’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed 177e4f8af61 to main and 75b2e715ae7 to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • alexpott committed 75b2e715 on 11.x
    task: #3589630 Deprecate NodeViewController
    
    By: acbramley
    By: larowlan...

  • alexpott committed 177e4f8a on main
    task: #3589630 Deprecate NodeViewController
    
    By: acbramley
    By: larowlan...

Status: Fixed » Closed (fixed)

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