17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1407 Views |
-
Problems adding Page types and others

21 November 2008 at 11:11am
I'm developing the tutorial and i've followed all steps but when I try to add a new page type i do all the tutorial says but they don't appear in the page type list. I built the datadase, I flushed and nothing. Could ypu help me please???
-
Re: Problems adding Page types and others

21 November 2008 at 1:47pm
Couple things to check - if you installed with 2.2.3 and the tutorial theme make sure your code is in tutorial/code/ otherwise it should be in mysite/code/. Make sure your new page type has the correct code eg its at least like.
<?php
class PageType extends Page {}
class PageType_Controller extends Page_Controller {}
?> -
Re: Problems adding Page types and others

29 November 2008 at 9:11am Last edited: 29 November 2008 9:12am
I must be doing something wrong. I did what you said but I still have the same problem. For example the Page Type ArticlePage doesn't appear and it's the code:
<?php
/**
* Defines the ArticlePage page type
*/
class ArticlePage extends Page {
static $db = array(
'Date' => 'Date',
'Author' => 'Text'
);
static $has_one = array(
);
static $defaults = array(
'ProvideComments' => true
);
static $icon = "mysite/images/treeicons/news";
function getCMSFields() {
$fields = parent::getCMSFields();
$fields->addFieldToTab('Root.Content.Main', new CalendarDateField('Date'), 'Content');
$fields->addFieldToTab('Root.Content.Main', new TextField('Author'), 'Content');
return $fields;
}
}class ArticlePage_Controller extends Page_Controller {
}
?>
What's wrong with that code?????
-
Re: Problems adding Page types and others

1 December 2008 at 12:42pm
Did you install with the tutorial option (rather then the blackcandy) and that file inside tutorial/code/
-
Re: Problems adding Page types and others

2 December 2008 at 4:09am
I uninstalled and installed again and I found this that could be the reason of my problems:
File permissions
Does the webserver know where files are stored? OK (C:\wamp\www\silverstripe-v2.2.3/)
mysite/ folder exists OK
sapphire/ folder exists OK
cms/ folder exists OK
jsparty/ folder exists OKIs the .htaccess file writeable? Unable to detect whether I can write to files. Please ensure C:\wamp\www\silverstripe-v2.2.3/.htaccess is writable.
Is the mysite/ folder writeable? Unable to detect whether I can write to files. Please ensure C:\wamp\www\silverstripe-v2.2.3/mysite is writable.
Is the tutorial/ folder writeable? Unable to detect whether I can write to files. Please ensure C:\wamp\www\silverstripe-v2.2.3/tutorial is writable.
Is the assets/ folder writeable? Unable to detect whether I can write to files. Please ensure C:\wamp\www\silverstripe-v2.2.3/assets is writable.
Is the temporary folder writeable? OKCould it be the problem?? if it's the problem, how can I fix it??
Thank you!!
-
Re: Problems adding Page types and others

2 December 2008 at 4:16am
thank you for all, I fixed it already!!.
| 1407 Views | ||
|
Page:
1
|
Go to Top |


