17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 2115 Views |
-
Default Content textareafield not show up

27 November 2008 at 2:04am Last edited: 27 November 2008 2:26am
Hi!
I am building a site containing lots of different page types. Everything is working great except that I suddenly noticed that the content textara field on every page type Page is gone. The header displays, but the dark grey box that should display the textarea field is empty.
For some of the page types I've created I use "$fields->removeFieldFromTab("Root.Content.Main","Content");" to remove this field. But I never ment to remove it from every page. I don't know if this is the reason either, because when I comment all theese lines out the content fields still does not show up.
Any suggestions?
-
Re: Default Content textareafield not show up

27 November 2008 at 3:06am
I now see that this problem happens to every HtmlEditorField, not only the default Content field. When I try adding new HtmlEditorFields they only show up with a header.
-
Re: Default Content textareafield not show up

27 November 2008 at 3:44am
Further research points the problem to the class=\"$class\" attribute in the <textarea.. output in the HtmlEditorField.php class. The $class variable contains the value "htmleditor typography". I have not edited non of these css-classes..
Anyone?
-
Re: Default Content textareafield not show up

27 November 2008 at 3:46am
Lines 82-85 of sapphire/forms/HtmlEditorField.php should be
$class = "htmleditor";
$class = ($this->extraClass)?$class." ".$this->extraClass:$class;
return "<textarea class=\"$class\" rows=\"$this->rows\" cols=\"$this->cols\" style=\"$style\" tinymce=\"true\" id=\"" . $this->id() . "\" name=\"{$this->name}\">$cleanVal</textarea>";
Sounds like you could be missing the first of those for whatever reason. -
Re: Default Content textareafield not show up

27 November 2008 at 4:14am
And the lesson is:
Don´t plase an empty allowed_children array like this:
static $allowed_children = array('');
| 2115 Views | ||
|
Page:
1
|
Go to Top |


