We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is a (multiple allowed):
bug
enhancement
question
CakePHP Version: 3.5.14
Plugin Version/Branch: COMPOSER REQUIREMENTS (e.g. dev-master, dev-4.0.1-alpha, 3.1.*).
dev-master
dev-4.0.1-alpha
3.1.*
I have a route attached to a page called 'dashboard'
$routes->connect('/', ['controller' => 'Pages', 'action' => 'display', 'dashboard']);
So, using the Navbar help I've created a link like this:
$this->Navbar->link('Dashboard', ['controller' => 'Pages', 'action' => 'display', 'dashboard'])
And the generated link is '/' since its routed that way.
In another page, '/home', (pages/display/home) the link '/' is marked as 'active' and this is wrong.
How can I check the current page properly?
I got the root page active even on another page. Normalize functions seems not work properly when the URL is attached to '/' route.
Normalize should check the URL in routes and consider it.
The text was updated successfully, but these errors were encountered:
So, I'm running more tests here and there are more details I can add here:
I have this route
so my mysite.dev/ is conected to my dashboard page
mysite.dev/
And I have added this link in my Navbar
When opening another page, ie: mysite.dev/about the compareUrls() will compare '/' (my dashboard page) with the current page '/about'
'/'
'/about'
Then, the normalize() will come up with the wrong structure for the '/' url.
'pass' => [ (int) 0 => 'about' ], 'controller' => 'Pages', 'action' => 'display', 'plugin' => null, '_matchedRoute' => '/pages/*'
Note the pass parameter wrong. It should be dashboard and not the current page about.
I think the line
$url = Router::parseRequest(new ServerRequest($this->_removeRelative($url)));
is not parsing the root route right.
If I remove the route in my routes.php this thing doesn't happen and the normalized version for it is:
routes.php
'pass' => [ (int) 0 => 'dashboard' ], 'controller' => 'Pages', 'action' => 'display', 'plugin' => null, '_matchedRoute' => '/pages/*'
Check the pass parameter changing.
Sorry, something went wrong.
No branches or pull requests
This is a (multiple allowed):
bug
enhancement
question
CakePHP Version: 3.5.14
Plugin Version/Branch: COMPOSER REQUIREMENTS (e.g.
dev-master
,dev-4.0.1-alpha
,3.1.*
).What you did
I have a route attached to a page called 'dashboard'
So, using the Navbar help I've created a link like this:
And the generated link is '/' since its routed that way.
In another page, '/home', (pages/display/home)
the link '/' is marked as 'active' and this is wrong.
How can I check the current page properly?
What happened
I got the root page active even on another page.
Normalize functions seems not work properly when the URL is attached to '/' route.
What you expected to happen
Normalize should check the URL in routes and consider it.
The text was updated successfully, but these errors were encountered: