5411 Posts in 1648 Topics by 1187 members
|Go to End|
29 December 2009 at 4:20am Last edited: 29 December 2009 4:21am
Hi there! Hope anyone can help me with this problem i am stuggling around..
I have created a Page called "Article" which extends "Page". Works great... I have then created another Page called "Category" which extends "Article" (which extends "Page"). Reason is, i want to have all the special properties of "Article" also inside of "Category".
The problem is, i cannot create a Category. I tried to change "$can_be_root", but it didnÂ´t affect anything. After hours ... i replaced changed "Article" to "Page", so the "Category" would not longer extend "Article" but "Page". This worked!!? I can then create a Page of Type "Category" in the Root. But as you know, i do not have the same properties as my Article Page has.
What makes me really diffuse that i have another pagetype called "Event" which i can create and which is also a child of "Article".
This is the hierarchy for example (Please ignore _ since whitespaces are stripped in the forum). Maybe it explains better what i tried to explain above.
___+- Category (working)
_____+- Category (not working)
Can anyone help me please? Any answer may help! Thanks!
30 December 2009 at 2:24am
What do you mean by 'can't create'? Does your Category page appear in the create page dropdown in the the left menubar of the CMS? In that case: what happens when you try to create one? Any error messages?
Is your Event page class-that-works equal to your Category page class-that-doesn't-work in all but the classname?
31 December 2009 at 11:19am
It happens nothing. "Category" appears in the Dropdown, but if I click "Create", just nothing happens.
Both classes are not identic, but both extend Article and Article_Controller....
1 January 2010 at 12:50am
Something must be wrong in your Category code (since Event works). Did you put Silverstripe in dev mode? Did you try FireBug to look for an error? You could try and build up the Category code anew start with 'empty' classes and go step by step to find where the mishap occurs. I'm sorry I can't be of more help without actually viewing your code, but this should at least get you a bit further...
|Go to Top|