Strange Error When Editing or Adding Pages - With HTML in Pages

Last post 09-18-2009, 1:46 PM by AdamTheMan103. 2 replies.
Sort Posts: Previous Next
  •  09-17-2009, 3:53 PM 55715

    Strange Error When Editing or Adding Pages - With HTML in Pages

    Hello,
     
    I am using CuteEditor for my Content Management System. There is a "Pages Module" that we use to manage all the pages for any given website. The problem that I am having  is that when I add or edit certain pages with HTML code within them it does not update the database. It will update every other field except the textarea field used by CuteEditor. If I do the same thing on the same server with no HTML inside the pages it updates no problem. Also, the same thing happens if you try to add a page with the HTML in it.
     
    View the CMS at http://crm.ktechconsult.com/ecmsw/administrator/index.php
    Login with username "ceditor" and password "ceditor".
     
    Click "Pages" and view the list of pages. Click edit on  "News and Events Page". Then add something in maybe a number or some text at the top of the page and submit. Click edit again to view the page and you will see the changes did not work. This happens on other pages as well.
     
    Try the same thing on "Test Page" at the bottom. It updates just fine. 

    I have tried everything in the book to solve this problem. Now I am looking for help!
     
    Here is the code used for the "Edit Page" editor.
     
     <?php
                 $PageText2 = $req_page_info["PageText"];
                       $editor=new CuteEditor();
                       $editor->ID="PageText";
                       $editor->Text="$PageText2";
                       $editor->FilesPath="ceditor";
                       $editor->ResizeMode="ResizeCorner";
                       $editor->AutoConfigure="Default";
                       $editor->XHTMLOutput=true;
                       $editor->EditorWysiwygModeCss="../themes/default/css/stylesheet.css";
                       $editor->BreakElement="P";
                       $editor->Width="768";
                       $editor->Height="450";
                       $editor->RemoveTBODYTag=true;
                       $editor->Draw();
                       $editor=null;
                       //use $_POST["PageText"]to catch the data
                ?>
    This is very important because we purchased the $400 license to use the editor for our CMS for many different servers!
     
    An help appreciated,
    Adam
  •  09-18-2009, 9:52 AM 55730 in reply to 55715

    Re: Strange Error When Editing or Adding Pages - With HTML in Pages

    Please try the following code. In the target page, please print the content of Cute Editor.
     
    1. <?php include_once("CuteEditor_Files/include_CuteEditor.php") ; ?>   
    2. <html>   
    3.     <head>   
    4.     </head>   
    5.     <body>   
    6.     <form name="theForm" action="Get_HtmlContent.php" method="post">   
    7.             <?php   
    8.                 $editor=new CuteEditor();   
    9.                 $editor->ID="Editor1";   
    10.                 $editor->Text="Hello World";        
    11.                 $editor->EditorBodyStyle="font:normal 12px arial;";   
    12.                 $editor->Draw();   
    13.                 $editor=null;   
    14.                    
    15.                 //use $_POST["Editor1"]to catch the data    
    16.             ?>   
    17.         </form>   
    18.     </body>   
    19. </html>  

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  09-18-2009, 1:46 PM 55742 in reply to 55730

    Re: Strange Error When Editing or Adding Pages - With HTML in Pages

    I resolved the problem. It was not inserting data into the MySQL db because of apostrophes and other special characters. I used
     
    $pagetext = mysql_real_escape_string ($_POST['PageText']);
     
    to fix the problem
View as RSS news feed in XML