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

Error While Using A Custom Page Template

Started by Muut Archive 10 years ago · 4 replies · 385 views
10 years ago

Hi, I've created a custom page template for a profiles page. This seems to work fine. I've then also created a profile page template, so that I can create sub pages for the profiles themselves. Neither of my custom page templates extend the default, and instead I just create a fresh one. However, when it comes to saving I get the following error message:

Whoops\Exception\ErrorException thrown with message "Argument 1 passed to Grav\Common\Page\Page::move() must be an instance of Grav\Common\Page\Page, null given, called in /Users/me/Development/Sites/com.me/www/user/plugins/admin/classes/cont roller.php on line 1104 and defined"

Stacktrace:

13 Whoops\Exception\ErrorException in /Users/me/Development/Sites/com.me/www/system/src/Grav/Common/Page/Pag e.php:737

12 Whoops\Run:handleError in /Users/me/Development/Sites/com.me/www/system/src/Grav/Common/Page/Pag e.php:737

11 Grav\Common\Page\Page:move in /Users/me/Development/Sites/com.me/www/user/plugins/admin/classes/cont roller.php:1104

10 Grav\Plugin\AdminController:taskSave in /Users/me/Development/Sites/com.me/www/u ser/plugins/admin/classes/cont roller.php:129

9 call_user_func in /Users/me/Development/Sites/com.me/www/user/plugins/admin/classes/cont roller.php:129

8 Grav\Plugin\AdminController:execute in /Users/me/Development/Sites/com.me/www/user/plugins/admin/admin.php:27 2

7 Grav\Plugin\AdminPlugin:initializeController in /Users/me/Development/Sites/com.me/www/user/plugins/admin/admin.php:31 9

6 Grav\Plugin\AdminPlugin:onPagesInitialized in /Users/me/Development/Sites/com.me/www/vendor/symfony/event-dispatcher /EventDispatcher.php:181

5 call_user_func in /Users/me/Development/Sites/com.me/www/vendor/symfony/event-dispatcher /EventDispatcher.php:181

4 Symfony\Component\EventDispatcher\EventDispatcher:doDispatch in /Users/me/Development/Sites/com.me/www/vendor/symfony/event-dispatcher /EventDispatcher.php:46

3 Symfony\Component\EventDispatcher\EventDispatcher:dispatch in /Users/me/Development/Sites/com.me/www/vendor/rockettheme/toolbox/Even t/src/EventDispatcher.php:23

2 RocketTheme\Toolbox\Event\EventDispatcher:dispatch in /Users/me/Development/Sites/com.me/www/system/src/Grav/Common/Grav.php :417

1 Grav\Common\Grav:fireEvent in /Users/me/Development/Sites/com.me/www/system/src/Grav/Common/Grav.php :255

0 Grav\Common\Grav:process in /Users/me/Development/Sites/com.me/www/index.php:38

Is this a bug with Grav or the way I'm doing things? Would be nice to have a more descriptive error message too.

Cheers

10 years ago

Make sure your blueprint have the route parameter. If you're not extending the default, you need to put that in, or the page won't know where it's to be put. See this example.

10 years ago

I liked your response, but just wanted to say thank you. That was exactly what I had missed.

10 years ago

I have the same problem. My two custom blueprints don't have any route parameter. One of them has the same error as Nineteenneightyeight's.
However, as the link is dead, I don't really guess how to configure this route parameter...

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1371 9 years ago
Archive · by Muut Archive, 9 years ago
2 944 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2960 9 years ago
Archive · by Muut Archive, 9 years ago
3 1127 9 years ago