Anyone run into this issue?
[Notice] Trying to get property of non-object
$state->currentPageID = $parent->ID;
Line 39 /lumberjack/code/forms/gridfield/GridFieldSiteTreeAddNewButton.php
Many thanks :)
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Anyone run into this issue?
[Notice] Trying to get property of non-object
$state->currentPageID = $parent->ID;
Line 39 /lumberjack/code/forms/gridfield/GridFieldSiteTreeAddNewButton.php
Many thanks :)
Hi,
I have the same problem.
SS 3.1.9 and Lumerjack 1.1
Did you find a solution?
I'm also having the same issue.
Lumberjack 1.1
SilverStripe 3.2
Any help appreciated!
Error:
AH01215: PHP Catchable fatal error: Argument 1 passed to GridFieldSiteTreeAddNewButton::getAllowedChildren() must be an instance of SiteTree, null given, called in /silverstripe-lumberjack-1.1/code/forms/gridfield/GridFieldSiteTreeAddNewButton.php on line 38 and defined in /silverstripe-lumberjack-1.1/code/forms/gridfield/GridFieldSiteTreeAddNewButton.php on line 17
Identical problem here. Anyone know a fix for this? This is devastating for my project
OK, I've managed to patch it for now. It's a dirty fix but it's better than having it not work at all.
The issue is caused by the GridField for blog posts on the member object.
In the file blog/code/extensions/BlogMemberExtension.php find the following code:
$gridField = new GridField(
'BlogPosts',
'Blog Posts',
$this->owner->BlogPosts(),
new GridFieldConfig_BlogPost()
);
And replace it with:
$conf = new GridFieldConfig_BlogPost();
$conf->removeComponentsByType('GridFieldSiteTreeAddNewButton');
$gridField = new GridField(
'BlogPosts',
'Blog Posts',
$this->owner->BlogPosts(),
$conf
);
This will retain the ability to view and modify a user's blog posts, but not add one.