Maybe I did not understand kirby routing!
if I use this code
c::set('routes', array(
array(
'pattern' => 'reset/(:any)/(:any)',
'action' => function($username,$resetcode) {
return page('reset');
}
)
));
when I try to get to the url ‘reset/some/value’ of the site I get this error message
Fatal error: Call to a member function code() on a non-object in /web/htdocs/kirby/kirby.php on line 412
obviously ‘reset’ is a real first level page!
same message is returned if I use
return array('reset', $data);
or
return response::json(array(
'some', 'json', 'stuff'
));
No problem with:
return go('some/page');
If I remove c::set('languages' ...etc
from config.php (meanwhile, there seems to be a problem of localization function) I have no errors but if I use at the end of router action function
return page('reset')
or
return array('reset', $data);
i get a blank page!!!
@bastianallgeier it’s a bug or I did not understand kirby routing??!!
thanks in advance!