Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Error reordering menu in gantry Hydrogen (v5.4.22 / g5_hydrogen)

Started by German Arduino 8 years ago · 2 replies · 804 views
8 years ago

Hi:

I've several Grav sites running very well. But, in one in particular, I tried an usual operation, reorder the menu options, and when I press Save Menu, I get the error:

Whoops \ Exception \ ErrorException (E_ERROR)
Call to a member function rawRoute() on null

Whoops\Exception\ErrorException
…/system/src/Grav/Common/Page/Page.php1749

{
unset($this->route);
unset($this->slug);
}

PHP
/**
 * Gets and Sets the page raw route
 *
 * @param null $var
 *
 * @return null|string
 */
public function rawRoute($var = null)
{
    if ($var !== null) {
        $this->raw_route = $var;
    }

    if (empty($this->raw_route)) {
        $baseRoute = $this->parent ? (string)$this->parent()->rawRoute() : null;

        $slug = $this->adjustRouteCase(preg_replace(PAGE_ORDER_PREFIX_REGEX, '', $this->folder));

        $this->raw_route = isset($baseRoute) ? $baseRoute . '/' . $slug : null;
    }

    return $this->raw_route;
}

/**
 * Gets the route aliases for the page based on page headers.
 *
 * @param  array $var list of route aliases
 *
 * @return array  The route aliases for the Page.
 */
public function routeAliases($var = null)
{
    if ($var !== null) {
        $this->routes['aliases'] = (array)$var;

Any hint will be appreciated.

Thanks.

8 years ago

Sad that nobody can help, may be is time to go back to Wordpress... 😦

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
3 92 2 hours ago
Support · by Anna, 3 days ago
2 94 23 hours ago
Support · by Justin Young, 24 hours ago
1 62 24 hours ago
Support · by Duc , 1 week ago
2 98 6 days ago
Support · by Colin Hume, 1 week ago
2 91 6 days ago