Visual editor - error while save document

Author Message

Aleksey Tik

Saturday 12 April 2008 4:11:44 am

When i try save Fronpage obget with table created in visual editor i get exeption

Fatal error: Uncaught exception 'DOMException' with message 'Not Found Error' in /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php:1019 Stack trace: #0 /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php(1019): DOMNode->removeChild(Object(DOMElement)) #1 /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php(1025): eZXMLInputParser->fixSubtree(Object(DOMElement), Object(DOMElement)) #2 /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php(997): eZXMLInputParser->fixSubtree(Object(DOMElement), Object(DOMElement)) #3 /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php(888): eZXMLInputParser->processBySchemaTree(Object(DOMElement)) #4 /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php(846): eZXMLInputParser->processSubtree(Object(DOMElement), NULL) #5 /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php(846): eZXMLInputParser->processSubtree(Object(DOMElement), Object(DOMElement)) #6 /var/www/ez/kernel/classes/datatyp in /var/www/ez/kernel/classes/datatypes/ezxmltext/ezxmlinputparser.php on line 1019
Fatal error: eZ Publish did not finish its request

The execution of eZ Publish was abruptly ended, the debug output is present below.

as I understand this occur becouse table structure was damaged (table looks like one <td></td> tag pair was losted. I can't say more becouse i can't disable visual editor). Only way to resolve it i found is to delete table.

Bastian Fenske

Tuesday 15 April 2008 2:13:13 am

This works for me:


    // Remove only nodes that don't match schema (recursively)
    function fixSubtree( $element, &$mainChild )
    {
        $parent = $element->parentNode;
        $mainParent = $mainChild->parentNode;
        if ( $element->hasChildNodes() )
        {
            // http://php.net/manual/en/domnode.removechild.php#56556
            $childNodes = array();
            foreach($element->childNodes as $childNode) {
           	    $childNodes[] = $childNode;
            }
   
            foreach ($childNodes as $childNode) {
            	
                $childNode = $childNode->parentNode->removeChild($childNode);
                $childNode = $mainParent->insertBefore( $childNode, $mainChild );

                if ( !$this->XMLSchema->check( $mainParent, $childNode ) )
                {
                    $this->fixSubtree( $childNode, $mainChild );
                }
            }
        }
        $element = $parent->removeChild( $element );
    }

Basti

Carsten Koehler

Monday 07 July 2008 2:30:56 am

I had the same error message. After the change, I was able to save again.

But now I have a new problem. Newly created articles are completely saved as a link to itself. Modify I then a second time, the text layout is saved as I wish. How can I eliminate this problem?

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 14:40:22
Script start
Timing: Jan 29 2025 14:40:22
Module start 'layout'
Timing: Jan 29 2025 14:40:22
Module start 'content'
Timing: Jan 29 2025 14:40:22
Module end 'content'
Timing: Jan 29 2025 14:40:22
Script end

Main resources:

Total runtime0.0162 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.4063151.2422
Module start 'layout' 0.00500.0045 739.648436.7109
Module start 'content' 0.00960.0050 776.359491.3281
Module end 'content' 0.01460.0016 867.687533.9922
Script end 0.0162  901.6797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002314.3856140.0002
Check MTime0.00116.5435140.0001
Mysql Total
Database connection0.00084.725010.0008
Mysqli_queries0.004125.269830.0014
Looping result0.00000.104510.0000
Template Total0.00116.810.0011
Template load0.00085.181510.0008
Template processing0.00031.550510.0003
Override
Cache load0.00063.575110.0006
General
dbfile0.00158.980380.0002
String conversion0.00000.154640.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs