7911 Posts in 1354 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » SimpleHTMLEditorField doesn't show in popup
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 1101 Views |
-
SimpleHTMLEditorField doesn't show in popup

15 September 2010 at 11:34am
Hi All,
I have a weird error. I have a site using HasManyDOM to hold testimonials for a page. The Testimonial class has two HTML fields using SimpleHTMLEditorField in the popup. This works fine in all standard browsers on my computer (IE6+, FF, Opera, Chrome, Safari) and my colleagues computer. However, on the client's computer the SimpleHTMLEditorFields are not appearing in the popup although the popup appears and the other fields appear. The popup functionality in all other respects is fine. A new testimonial can be created but with no way to edit the two HTML text fields. This behaviour is the same across all browsers on the client's machine (tried with IE8 and FF3.8)
I'm stumped as to possible cause. I suspect it's something locally on the client's machine but I can't seem to find anything that stands out as a cause.
Does anyone have a suggestion?
-
Re: SimpleHTMLEditorField doesn't show in popup

15 September 2010 at 9:31pm Last edited: 15 September 2010 9:33pm
Yes, I can confirm this issue. SimpleTinyMCEField isn't working, too.
DOM is outputting a regular Textarea within the popup.I have set
Director::set_environment_type("dev");
in _config.php because there was a known bug. But that doesn't solve my problem.
I am using DOM r414 right now.
-
Re: SimpleHTMLEditorField doesn't show in popup

16 September 2010 at 3:07am Last edited: 16 September 2010 3:08am
Is this a related issue? http://www.silverstripe.org/upgrading-silverstripe/show/290536#post290536
-
Re: SimpleHTMLEditorField doesn't show in popup

16 September 2010 at 7:52am
No, I'm not getting that issue. This website is using v2.3 and the related DOM version.
It only occurs on this client's pc as far as I can tell so I'm pretty confident it is something related to her machine but I don't have any idea what.
-
Re: SimpleHTMLEditorField doesn't show in popup

19 November 2010 at 5:25am Last edited: 19 November 2010 6:05am
Finally a fix!
I experienced the exact same problem with SS 2.4.3 and the latest revision of DataObjectManager (r511):
The SimpleHTMLEditorField never showed up in a regular PopUp window of any ComplexTableField (e.g. HasOneComplexTableField, HasManyComplexTableField, ManyManyComplexTableField)The problem
When using any kind of *ComplexTableField, jQuery was NOT loaded in the iframe of the PopUp window.
So obviously none of the scripts of SimpleHTMLEditorField could run, because the required framework wasn´t loaded.The simple fix
1. Use DataObjectManager instead of the *ComplexTableField (that´s what I´m doing now)2. If you want to use a ComplexTableField, replace the following lines of function FieldHolder() in SimpleHTMLEditorField.php:
public function FieldHolder()
{
Requirements::javascript('sapphire/thirdparty/jquery/jquery-packed.js'); // load jquery framework for following scripts to run
Requirements::javascript('dataobject_manager/javascript/jquery.wysiwyg.js');
Requirements::css('dataobject_manager/css/jquery.wysiwyg.css');
Requirements::customScript("
// use 'jQuery' call instead of '$' to prevent problems with prototype framework
jQuery(function() {
jQuery('#{$this->id()}').wysiwyg({
{$this->getConfig()}
}).parents('.simplehtmleditor').removeClass('hidden');
});
");
return parent::FieldHolder();
}@UncleCheese: could you please add this fix to the source code of your module. This fix solves the problems when using a ComplexTableField, but doesn´t affect the use in combination with DataObjectManager.
| 1101 Views | ||
|
Page:
1
|
Go to Top |



