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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

Problem with SimpleHTMLEditorField in 2.4


Go to End


9 Posts   6126 Views

Avatar
zueri

Community Member, 8 Posts

27 April 2010 at 8:38am

Hi
I'm struggling with the SimpleHTMLEditorField in a DOM Popup. I'm working on my latop under Win7 and Wamp. If I edit my Newssection (which has an HTMLEditor in the fieldlist), everything is fine. If I upload the code to my Linux Hostingprovider, the htmleditor will not show up. I also tried the SimpleTinyMCEField and SimpleWysiwygField. Evertime the effect is nearly the same. If I use SimpleHTMLEditorField the filed will no shown up, with SimpleTinyMCEField at least a Textares shows up (but without controls). Any idea? I tried to delete all the old code from the hosting server and uploaded it again. But there was no change. Is there maybe a wrong path somewhere (case sensitiv)?

Here's my code:

		$fields = new FieldSet(
			new TextField('Title',_t('News.TITLE','Title')),
                        new SimpleTinyMCEField('Text',  _t('News.TEXT','Text')),
			new DatePickerField('ShowFrom',  _t('News.SHOWFROM','Show from')),
                        new DatePickerField('ShowTill', _t('News.SHOWTILL','Show till')),
                        $fileField
		);

                return $fields;

Thanks for help.

Avatar
xeraa

Community Member, 58 Posts

3 May 2010 at 11:17am

Edited: 03/05/2010 11:20am

This is the same issue as in http://www.silverstripe.org/dataobjectmanager-module-forum/show/283189#post283189

This has been working something like 2 or 3 weeks ago (with SS trunk), but right now the buttons disappear (TinyMCE and Wysiwyg) or the whole field, as the class "hidden" is added to it (HTMLEditor). This only happens if you are in production mode.
As a quick fix you can use .../admin/?isDev=1 in production mode and the field is working again.

I think the combination of JS files is breaking something - UncleCheese could you please help us out? Thanks!

PS: Using trunk for both SilverStripe and DataobjectManager

Avatar
silverstriper

Community Member, 8 Posts

3 May 2010 at 7:54pm

I third this, very annoying!

SimpleHTMLEditorField simply does not show up in the popup as it's hidden in the CSS and the JavaScript isn't kicking in for some reason...

Avatar
UncleCheese

Forum Moderator, 4102 Posts

4 May 2010 at 3:22am

I just checked in a possible fix. Can you guys do some testing?

Avatar
xeraa

Community Member, 58 Posts

4 May 2010 at 3:34am

This fixed it for me (HTMLEditor).

Thanks a lot for the quick response :)!

Avatar
zueri

Community Member, 8 Posts

4 May 2010 at 8:36am

The fix also worked for me. I tried all the mentioned fields without errors.

Thanks

Avatar
silverstriper

Community Member, 8 Posts

4 May 2010 at 8:31pm

Edited: 04/05/2010 8:31pm

This worked for me in most of my popups. I resolved the remaining issues by tracing the problem down to a conflict with a workaround I was using for the DatePickerField where I was doing the following:

$df = new DatePickerField( 'NewsDate' );
$df->setConfig('showcalendar', true);
$fields->push( $df );

Simply, changing it back to:

$fields->push( new DatePickerField( 'NewsDate' ) );

fixed it!

Thanks!

Avatar
UncleCheese

Forum Moderator, 4102 Posts

5 May 2010 at 1:34am

Yeah, all the new datefield stuff really threw me and made validation impossible, so for now the DatePickerField just circumvents all that and returns true for validation. :(

Go to Top