Problem/Motivation

When building or rebuilding the views_url_alias table, if there are aliases in the path_alias table that can't be matched to a route, the process fails with a ResourceNotFoundException. This leaves the alias table in a partial state with missing aliases.

Steps to reproduce

Create an alias to a controller url and then remove/change the controller route.
Try to rebuild the table.

Proposed resolution

Wrap the router->match($alias) call in a try / catch and log a bad alias message.

Remaining tasks

Have a patch to add once the issue is created.

User interface changes

API changes

Data model changes

Comments

cgmonroe created an issue. See original summary.

cgmonroe’s picture

Here's the patch

rachel_norfolk’s picture

Status: Active » Reviewed & tested by the community

The patch does what we expect it to do - a warning is logged that there was an alias in the table that couldn’t be matched.

For the purposes of this issue, I think that makes it RTBC.

It might be that a future issue looks at ways of ensuring the table is clean.

  • dd6f4717 committed on 3.x
    Issue #3535598 by cgmonroe, rachel_norfolk: ResourceNotFoundException...
rachel_norfolk’s picture

Status: Reviewed & tested by the community » Fixed

Thanks cgmonroe!

Status: Fixed » Closed (fixed)

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