I see there is a variable called authcache_p13n_default_request_router_autorebuild defined inside authcache_p13n.admin.inc, however I'm unable to find how to enable this "Autorebuld router" feature. Where it is implemented?

I'm currently getting the error "Failed to find request handler for route frag/panels/..." on several pages and it only gets fixed after clicking the "Rebuild routes" button on configuration.

As the description from the aforementioned variable says "Specifies whether the request router should try to rebuild the routing information when a request handler is missing" I was hoping to find something in the configuration to avoid manually rebuilding the routes every time I start getting that error on one of my pages.

Can this be solved from configuration?

Thanks,

Gabriel

Comments

gpollner created an issue. See original summary.

znerol’s picture

I'm sorry to disappoint you but the autorebuild feature was removed a long time ago. Seems like I forgot to remove the UI back then.

gpollner’s picture

Thanks for your answer.

As I still need to find a solution that doesn't require clicking the "Rebuild routes" button every time the error starts happening (which is not often but when it happens part of the frontend content disappears). I was thinking maybe some sort of path validation can be applied for $req['r'] on authcache_p13n_frontcontroller_handle_request somewhere before attempting to resolve the request handler ($handler = $router->getHandler($req['r']);) and in case that validation fails then call authcache_p13n_request_router_rebuild.

Could something like this make sense?

znerol’s picture

I hate to say that but in such situations it is critical to figure out what condition leads to the error. To me it sounds like the routes stored in the database get out-of-sync wrt to the requests generated by the frontend. Thus either something is corrupting the routes in the database or some condition leads to the frontend generating requests to inexistant routes.

Is this happening after content is saved? Or after the site structure changed?

znerol’s picture

Status: Active » Postponed (maintainer needs more info)