mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
[fix] Multisite issue when using find function
When running multisite with subfolder, the route includes the subfolder. The `find` function returns `null` since it only needs the page route, without the subfolder. This commit removes that subfolder as `$this->base`, which fixes the route on multisite with subfolder. This has been tested on multisite with Grav v1.7.30 and Flex Objects
This commit is contained in:
parent
4d4efb31e3
commit
95817c28d0
|
|
@ -957,6 +957,7 @@ class Pages
|
|||
public function find($route, $all = false)
|
||||
{
|
||||
$route = urldecode((string)$route);
|
||||
$route = str_replace($this->base, '', $route);
|
||||
|
||||
// Fetch page if there's a defined route to it.
|
||||
$path = $this->routes[$route] ?? null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user