View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0005295 | OXID eShop (all versions) | 2.4. Administer products | public | 2013-07-15 14:57 | 2024-02-07 11:47 |
Reporter | martinwegele | Assigned To | |||
Priority | low | Severity | minor | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Product Version | 4.7.6 / 5.0.6 | ||||
Summary | 0005295: Impossible to use more than one wysiwyg-editor on one page | ||||
Description | I tried to have another wysiwyg-pro editor in the article-main tab of the admin area. But it did not work. One obstacle is if ( $this->_oEditor === null ) { in oxAdminDetails::_getTextEditor . But it seems there are more problems because if I reset $this->_oEditor = null; in _generateTextEditor the content of the editor is empty, so there must be something wrong with _getEditValue. | ||||
Steps To Reproduce | 1. Insert $this->_aViewData["myeditor"] = $this->_generateTextEditor( "100%", 300, $oArticle, "oxarticles__oxshortdesc", "details.tpl.css"); in admin/article_main.php's render-method. 2. Add an additional Smarty-tag [{ $myeditor }] in /application/views/admin/tpl/article_main.tpl 3. Try to edit a product in the admin area. 4. Insert $this->_oEditor = null; in the first line of oxAdminDetails::_generateTextEditor 5. Try to edit a product in the admin area. | ||||
Additional Information | It seems that _getEditValue is not called at all. Additionally you will have to modify one line in application\views\admin\tpl\article_main.tpl: <form name="myedit" id="myedit" action="[{ $oViewConf->getSelfLink() }]" method="post" onSubmit="return copyLongDesc( 'oxarticles__oxlongdesc' );" style="padding: 0px;margin: 0px;height:0px;"> | ||||
Tags | WYSIWYG | ||||
Theme | Not defined | ||||
Browser | All | ||||
PHP Version | Not defined | ||||
Database Version | Not defined | ||||
|
http://article.gmane.org/gmane.comp.php.oxid.general/2418 |
|
@Sven Brunk: It's still not possible by just copying the code from the original entry. Furthermore, the original code will not work with the current shop code, since the following method will be called to get the content for the editor:protected function getEditValue($object, $fieldName) { return $object ? $object->getLongDescription()->getRawValue() : ''; }It ignores the parameter $field (@param string $field object field which content is passed to editor) by always loading the longdesc. The example from this bug entry tried to load oxshortdesc. The logical next step would be to write a module to overwrite this method, but the method (\OxidEsales\EshopCommunity\Application\Controller\Admin\AdminDetailsController::getEditValue) contains this note in the description: * @deprecated method will be removed in v7.0. Conclusion: Currently it's unclear how to get a second editor working or if that requirement is supported by the framework anyway. -MK |