Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Problem with SimpleHTMLEditorField in 2.4

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1 2
Go to End
Author Topic: 3027 Views
  • zueri
    Avatar
    Community Member
    5 Posts

    Problem with SimpleHTMLEditorField in 2.4 Link to this post

    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.

  • xeraa
    Avatar
    Google Summer of Code Hacker
    58 Posts

    Re: Problem with SimpleHTMLEditorField in 2.4 Link to this post

    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

  • silverstriper
    Avatar
    Community Member
    8 Posts

    Re: Problem with SimpleHTMLEditorField in 2.4 Link to this post

    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...

  • UncleCheese
    Avatar
    4085 Posts

    Re: Problem with SimpleHTMLEditorField in 2.4 Link to this post

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

  • xeraa
    Avatar
    Google Summer of Code Hacker
    58 Posts

    Re: Problem with SimpleHTMLEditorField in 2.4 Link to this post

    This fixed it for me (HTMLEditor).

    Thanks a lot for the quick response !

  • zueri
    Avatar
    Community Member
    5 Posts

    Re: Problem with SimpleHTMLEditorField in 2.4 Link to this post

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

    Thanks

  • silverstriper
    Avatar
    Community Member
    8 Posts

    Re: Problem with SimpleHTMLEditorField in 2.4 Link to this post

    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!

  • UncleCheese
    Avatar
    4085 Posts

    Re: Problem with SimpleHTMLEditorField in 2.4 Link to this post

    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.

    3027 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.