Error in block when using tinyMCE

Permalink
I have a problem when using tinyMCE editor in the add/edit window of a block. Whenever i try to add/update the block, I get the blank error window shown in the attachment.

The problem does not occurr when I remove the tinyMCE from initializing.

I have attached a small block especially made to show this problem, download the file and test it.

The HTML for this window is here:
<div style="z-index: 203; margin-left: -175px; width: 350px; margin-top: -100px; display: block; left: 825.5px; top: 213.5px;" id="ccm-dialog-window1" class="ccm-dialog-window ui-draggable"><div style="cursor: move;" class="ccm-dialog-title-bar-l"><div class="ccm-dialog-title-bar-r"><div id="ccm-dialog-title-bar1" class="ccm-dialog-title-bar"><div id="ccm-dialog-title1" class="ccm-dialog-title">Error</div><a class="ccm-dialog-close" href="javascript:void(0)">Close</a></div></div></div><div id="ccm-dialog-content-wrapper"><div class="ccm-dialog-content-l"><div class="ccm-dialog-content-r"><div style="width: 306px; height: 200px;" id="ccm-dialog-content1" class="ccm-dialog-content">
<div id="ccm-popup-alert">
   <div id="ccm-popup-alert-message"></div>
   <hr>
   <a class="ccm-button-right ccm-dialog-close" href="javascript:void(0)"><span>Close</span></a>
</div>
</div></div></div></div><div class="ccm-dialog-content-bl"><div class="ccm-dialog-content-br"><div class="ccm-dialog-content-b"></div></div></div></div>

2 Attachments

itrio
 
Mnkras replied on at Permalink Reply
Mnkras
umm, did you include tinymce's js..?
itrio replied on at Permalink Reply
itrio
tinyMCE is included automatically by concrete5, and is working is the example I have included.

The problem is the error message when you push the add/update button.
SVijay replied on at Permalink Reply
SVijay
Hi,

You dont have a save function in your controller, and you have two fields in your form but you have created only one field in db file

add the following code in controller.php
public function  save($data) {
      $args['data'] =    isset($data['data']) ? $data['data'] : '';
   $args['pagedata'] = isset($data['pagedata']) ? $data['pagedata'] : '';
         parent::save($args);
    }


and add this in your db.xml file
<field name="pagedata" type="X2">
            <notnull />
        </field>