Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

ChildrenOf in .ss templates get confused when multiple page types are loaded


Reply


8 Posts   1646 Views

Avatar
Nicolaas

Forum Moderator, 213 Posts

27 September 2007 at 1:19pm

Edited: 27/09/2007 2:10pm

Gurus

I have used ChildrenOf(about-us), which works fine, but when i change the page type (of the page on which the control is used (not the about-us page), it stops working...then the control ChildrenOf(about-us) does not have no children no more... - what am I doing wrong?

Nicolaas

Avatar
Nicolaas

Forum Moderator, 213 Posts

27 September 2007 at 2:25pm

Edited: 27/09/2007 2:35pm

Ok, it seems I solved this by creating a whole new page type... One of the main criticism of the whole silverstripe system would be that it seems I am forever "flushing" I am always saving and using the db/build?flush=1, while holding the shift key and still it does not do no nothing ;-) ... sometimes it takes forever for changes to be updated or for old information to disappear... this takes the fun away from the building, because you are working with "ghost" pages it seems.... Is there any way to improve this?

example... i load a page - i get some sort of php error.... I load again, I get an outdated page.... I load again, I get the new page...

part of this is that is also seems that I have to flush each page individually to update it.... How can I update the whole site AND the CMS all at once?

Avatar
Sigurd

Forum Moderator, 628 Posts

28 September 2007 at 12:18am

are you clear about the difference between "?flush=1" and "/db/build" ?
The way you're talking it sounds like you might be unnecessarily running dbbuild, however in any case it would be good to get to the bottom of the caching issue you're having!

do others have this problem?

Avatar
Nicolaas

Forum Moderator, 213 Posts

28 September 2007 at 12:27am

Yes, I think the difference between flush and db-build is that flush clears the cache and db-build rebuilds the database.

Maybe it is something to do with the cache of my isp or the webhost. however, I do not really have this problem with other sites.

Avatar
Nicolaas

Forum Moderator, 213 Posts

28 September 2007 at 10:06pm

Hi

The same problem keeps coming back.... see first post. I think it has something to do with the site being in a directory like this http://www.myisp.com/www.myactualsite.co.nz/mysite/....

I am now pretty sure it is a bug, because it works for a little while and then just stops....

I am just downloading the latest release to see if it does a better job.

Nicolaas

Avatar
Nicolaas

Forum Moderator, 213 Posts

29 September 2007 at 2:03pm

I have added my code + templates

Avatar
Sean

Forum Moderator, 922 Posts

29 September 2007 at 5:05pm

It's true that ?flush=1 only seems to clear the cache of the current template. I've noticed this behaviour. Perhaps we need to either make it clear all templates (making the process longer, but a more worthwhile endpoint), or make a new command like ?flushall=1?

Sean

Avatar
Nicolaas

Forum Moderator, 213 Posts

29 September 2007 at 5:19pm

I solved my own problem here... I had:

largeLeftPanelPage_controller extends Page_Controller

rather than

largeLeftPanelPage_Controller extends Page_Controller

Ok, lived and learned....