-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
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
Many To Many on the same object #3113
Comments
Why did you put |
Was a typo my bad. Sorry but it's not the solution. |
is this issue related to #1377 ? |
This is still an issue and I am getting the exact same error. Is there any news on when it will be getting fixed? See this example With related products extending the swipestripe module product class.
If I change $this->owner->RelatedProducts() with say CartPage::get() it works fine and the page loads otherwise I get the above error. |
Fixed with #3799 |
@tractorcow do you know when is this getting released in a stable version? |
A bit late, @adrian-stein but this is in 3.2.0+ |
I can't have a many to many relation working on the same object.
For example I have a Product object. I want this product to be linked to other products so I tried to put:
'RelatedProducts' => 'Product'
in my many_many attribute and then I tried to create a GridField to manage the link between them by using:
$RelatedProductsField = GridField::create(
'RelatedProducts',
'Related Products',
$this->RelatedProducts(),
GridFieldConfig_RelationEditor::create()
);
$fields->addFieldToTab('Root.RelatedProducts', $RelatedProductsField);
But I get the PHP error saying:
Fatal error: Call to a member function stat() on a non-object in /path-to-server/sitename/framework/model/DataObject.php on line 3231
The text was updated successfully, but these errors were encountered: