isActive() for routed page

I used a route to add a suffix to the url of some pages

  'pattern' => '(:all)-suffix',
  'action'  => function($url) {
    return page($url);

When visiting the page using the suffix it seems ‘isActive()’ and ‘isOpen()’ is no longer working to check if the page is active or open.

return site()->visit($url);

Thanks it worked for me.
But if I understand correctly the documentation states that it should also be correct to use page(),

Returning a page

function() {
  return page('some/page');

What went wrong?

In both instances you’re returning a page. It’s just that in the process of doing so, site->visit also sets site::page to be the page you’re retrieving, which makes isActive work correctly. Otherwise you just return the page.

Could it be, that site()->visit() doesn’t work anymore for this case (kirby version 2.2.x)? In my custom route i only use site()->visit(), and $page->isOpen() or $page->isActive() doesn’t seem to work.

UPDATE: Sorry, for the confusion. It was a misconfiguration on my page. Now it works as described…