Artikel bearbeiten funzt nicht

Gesperrt
holunda
Beiträge: 71
Registriert: Di 4. Mai 2004, 10:14
Kontaktdaten:

Artikel bearbeiten funzt nicht

Beitrag von holunda »

Hi Leute,

nach irgendeiner Änderung in meiner Seite funktioniert das bearbeiten von Artikeln nicht mehr. Weder das Insight Editing noch mit dem WYSIWYG Editor. Weder im IE noch im Firefox. im Firefox wird mir nicht mal das Text/Htnl feld angezeigt, nur die Buttons. Sobald ich auf diese klicke kommt folgende Fehlermeldung:

Code: Alles auswählen

Error: illegal character
Source File: javascript:setcontent(\'24\',\'front_content.php?action=10&idcat=2&idart=24&idartlang=24&type=CMS_HTML&typenr=1&lang=1&contenido=d3e224727f8a379f29a7038d1ef274bc\')
Line: 1, Column: 11
Source Code:
setcontent(\'24\',\'front_content.php?action=10&idcat=2&idart=24&idartlang=24&type=CMS_HTML&typenr=1&lang=1&contenido=d3e224727f8a379f29a7038d1ef274bc\')
Habe denCode schon durchsucht, offene Tags gibt es keine, offene Form Tags auch nicht.

Konkret gehts hierbei um folgende site:
www.hard-soft.at

Was kann ich noch probieren?
Wäre über eure Hilfe sehr dankbar.

Errorlog:

Code: Alles auswählen

[06-Dez-2004 10:19:28] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/includes/functions.mod.php(164) : eval()'d code on line 8
[06-Dez-2004 10:19:27] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/includes/functions.mod.php(164) : eval()'d code on line 8
[06-Dez-2004 10:19:25] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/includes/functions.mod.php(164) : eval()'d code on line 8
[06-Dec-2004 10:19:09] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/front_content.php(659) : eval()'d code on line 211
[06-Dec-2004 10:18:56] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/includes/include.con_editcontent.php(595) : eval()'d code on line 358
[06-Dec-2004 10:18:55] PHP Warning:  chdir(): Unable to access  in /home/www/kmm212/html/contenido/external/backendedit/front_content.php on line 27
[06-Dec-2004 10:18:55] PHP Warning:  main(): Failed opening 'config.php' for inclusion (include_path='.:/usr/share/php') in /home/www/kmm212/html/contenido/external/backendedit/front_content.php on line 24
[06-Dec-2004 10:18:55] PHP Warning:  main(config.php): failed to open stream: No such file or directory in /home/www/kmm212/html/contenido/external/backendedit/front_content.php on line 24
[06-Dec-2004 10:18:51] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/external/backendedit/front_content.php(669) : eval()'d code on line 229
[06-Dez-2004 10:18:45] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/includes/functions.mod.php(164) : eval()'d code on line 8
[06-Dez-2004 10:18:44] PHP Parse error:  parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/includes/functions.mod.php(164) : eval()'d code on line 8
Contenido Version 4.5.2 Alpha

mfg
Alex
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

wie sehen deine einstellungen in der phpinfo aus ?

bei (standard wäre)

magic_quotes_gpc On
magic_quotes_runtime Off
magic_quotes_sybase Off

?
*** make your own tools (wishlist :: thx)
holunda
Beiträge: 71
Registriert: Di 4. Mai 2004, 10:14
Kontaktdaten:

Beitrag von holunda »

hi,

magic_quotes_gpc On On
magic_quotes_runtime Off Off
magic_quotes_sybase Off Off

Modul mod_gzip nicht geladen
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

die einstellungen sind korrekt...

was ich nicht verstehe, bei dir werden die javascript ' mittels \ angezeigt...

bei mir sieht das ca so aus:
javascript:setcontent('9','front_content.php?action=10&idcat=1&idart=9&idartlang=9&type=CMS_HTMLHEAD&typenr=1&contenido=9512497cdad8f658fd56265d3c6ad35f')

warum er das jetzt bei dir anders macht weiss ich ehrlich gesagt nicht...

setzt du in einer deiner module die variable magic_quotes_runtime irgendwie auf on ?
*** make your own tools (wishlist :: thx)
holunda
Beiträge: 71
Registriert: Di 4. Mai 2004, 10:14
Kontaktdaten:

Beitrag von holunda »

scheint nicht generell so zu sein, siehe hier:

Code: Alles auswählen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" lang="de">
<head>
<base href="http://www.hard-soft.at/">
    <title>hard-soft Netzwerk Hardware Software Kommunikation Web Hosting Dienstleistungen</title>
    <link rel="stylesheet" type="text/css" href="./css/default.css" />
    <meta name="robots"        content="all" />
    <meta name="revisit"       content="after 7 days" />
    <meta name="revisit-after" content="1 week" />
    <meta name="description" content="Hard-Soft" />
    <meta name="keywords"    content="webdesign,development,entwicklung,hardware,software,server,netzwerk,telefonie,kommunikation" />
    <meta name="author"      content="hard-soft.at" />
    <meta name="publisher"   content="hard-soft.at" />
    <meta name="copyright"   content="Copyright 2003 hard-soft.at" />

    <!-- Turn off the crap from M$ -->
    <meta name="MSSmartTagsPreventParsing" content="true" />
    <meta http-equiv="imagetoolbar" content="no" />
<script type="text/javascript">

		/* Check if we are in a dual-frame or a quad-frame */
		if ( parent.parent.frames[0].name == "header")
		{
    		if ( parent.frames["right_top"].document.getElementById("c_3") ) {
                menuItem = parent.frames["right_top"].document.getElementById("c_3");
                parent.frames["right_top"].sub.click(menuItem);
            } 	
		} else {
        /* Check if submenuItem is existing
           and mark it */
		
            if ( parent.parent.frames["right"].frames["right_top"].document.getElementById("c_3") ) {
                menuItem = parent.parent.frames["right"].frames["right_top"].document.getElementById("c_3");
                parent.parent.frames["right"].frames["right_top"].sub.click(menuItem);
            } 
		}
    </script> 
<script language="javascript">

// searches the classname in the td above or the tr above
function getCellClass(element) {

    var el = document.getElementById(element);
    var cell = el.offsetParent;

    // if there is a classname in the td return the classname
    if ( cell.className != '' ) {
        return cell.className;
    }

    // set a flag in this td
    if ( cell.id == '' ) {
       cell.id = 'yes';
       var flg = 'yes'
       
    } else {
       var flg = cell.id;
       
    }

    //else go to the tagname table above   and search dowen for the tr tags
    while (el.tagName != 'TABLE') {
          el = el.offsetParent;
    }


    var elements = el.getElementsByTagName('TR');

    //go thrue all tr tags
    for (var row in elements) {

        if (isNaN(elements[row])) {
             var cells = elements[row].getElementsByTagName('TD');
             for (var id in cells) {
                 if(isNaN(cells[id])){

                   // check if the flg(td cell) is in this tr    if true return the calssname
                   if (cells[id].id==flg&&elements[row].className != '') {
                       return elements[row].className;
                   }
                 }
             }

        }




    }



    return false;
}


function setcontent(idart, act) {

        var a = document.getElementsByTagName("*");
        var str = '';
        var aId = '';
        var dcoElementCnt = 0;

        // loop through all elements
        for (var i=0; i < a.length; i++) {
                aId = a[i].id;
                aIdPrefix = aId.substr(0,4);

                // search for the id which containes HTML
                if (aIdPrefix == 'HTML') {

                        // check if its an 'contentEditable' Field
                        if (a[i].isContentEditable == true) {

                                 // read out the content
                                 var aContent = a[i].innerHTML;

                                 // split the idname in data - datas 0 is the Fieldname   2 is the typeid
                                 var data = aId.split("_");

                                 if ( aContent == "" ) {
                                    aContent = "!!";
                                    
                                 } else {

                                    // if there is an | in the text set a replacement chr because we use it later as isolator
                                    while( aContent.search(/\|/) != -1 ) {
                                        aContent = aContent.replace(/\|/,"§%%§");
                                    }
                                 }
                                 
                                 // build the string which will be send
                                 str += idart +'|'+ data[2] +'|'+ aContent +'|'+ data[0] +'||';

                        }
                        
                        
                        
                        
                        
                }

        }
        
        // set the string
        document.forms.editcontent.data.value = str;

        // set the action string
        if ( act != 0 ) {
            document.forms.editcontent.action = act;
        }

        // if there are 3 arguments, the className has to be seached
        if(arguments.length > 2){

            //search the class of the above element
            var classname = getCellClass(arguments[2]);

            if ( classname ) {
                document.forms.editcontent.con_class.value = classname;
            }
        }
        
        // submit the form
        document.forms.editcontent.submit();
        
}

</script>
<script src="http://www.hard-soft.at/contenido/external/mozile/mozileLoader.js" type="text/javascript"></script></head>
<body>
    <a name="top"></a>
    <div id="page">
	<div id="header">	</div>
        <div id="navigation">
            
<!-- ##### Main Navigation ##### -->
<ul class="dropdown">
<li><a href="4-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8" title="home">home </a></li>
<li><a href="13-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8" title="aktuelles">aktuelles </a></li>
<li><a href="6-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8" title="leistungen">leistungen </a></li>
<li><a href="7-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8" title="kontakt">kontakt </a></li>
<li><a href="19-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8" title="Support">Support </a></li>
</ul>
 
        </div>
	<div id="footer">
	    <div id="boxRight">
                 <div class="ServiceNavi">
<a href="14.html">Impressum</a> <a href="15.html">agb</a> <a href="16.html">Sitemap</a> </div>
                 
<!-- ##### Volltextsuche ##### -->
<div class="List">
<h1>Volltextsuche</h1>
<p>Gew&uuml;nschten Suchtext eingeben und auf go klicken.</p>
<form id="sitesearch" name="sites" method="post" action="/external/backendedit/front_content.php?changeview=edit&client=1&lang=1&action=con_editart&idartlang=24&type=&typenr=&idart=24&idcat=2&idcatart=&lang=1&contenido=9b0b5c676e2dc9833370491e2e10beb8">
<input type="text" size="20" name="suche" value="" />
<input type="submit" value="Go" /></form>
</div>
                    
	       <div class="List">
                    <h1>Neuigkeiten</h1>
                     
<!-- ##### NewsBlock ##### -->
<ul>
<li><a href="2-13-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8">.treatsoft. ist verfügbar! </a></li>
<li><a href="2-12-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8">Redesign hard-soft.at </a></li>
<li><a href="2-4-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8">Breitband Internet in Wildschönau/Niederau </a></li>
</ul>
                </div>
                <div class="List">
                    <h1>Kontakt</h1>
                    <p>hard-soft informationstechnologie gmbh<br />Mühltal 271<br />6311 Wildschönau-Oberau<br />+43 (5339) 20144<br />+43 (5339) 20144-44</p>
                </div>
                <div class="List">
                    <h1>Sonstiges</h1>
                    <p>
                        <a href="http://www.mozilla.org" target="_blank"><img src="./upload/logo/getfirefox.gif" alt="Mozilla Firefox" border="0" /></a>
                    </p>
                </div>
	    </div>
		
	<!-- Content -->
	<div id="boxLeft">
            <div class="breadcrumb">::: <a href="2-1-1.html?contenido=9b0b5c676e2dc9833370491e2e10beb8">News</a> </div>
            <div class="content">
                <h1><div id="HTMLHEAD_1_1" onFocus="this.style.border='1px solid #bb5577'" onBlur="this.style.border='1px dashed #bfbfbf'" style="border:1px dashed #bfbfbf" contentEditable="true">Fortbildung PRIMERGY Server</div><a href="javascript:setcontent('24','front_content.php?action=10&idcat=2&idart=24&idartlang=24&type=CMS_HTMLHEAD&typenr=1&contenido=9b0b5c676e2dc9833370491e2e10beb8')">
<img src="http://www.hard-soft.at/contenido/images/but_edithead.gif" border="0"></a>
<a href="javascript:setcontent('24','0')"><img src="http://www.hard-soft.at/contenido/images/but_speichern.gif" border="0"></a></h1>
                <div class="subheadline"><div id="HTMLHEAD_1_2" onFocus="this.style.border='1px solid #bb5577'" onBlur="this.style.border='1px dashed #bfbfbf'" style="border:1px dashed #bfbfbf" contentEditable="true"><!--StartFragment -->Wir halten uns für Sie fit! Andreas Mühlegger ist ab sofort Certified PRIMERGY Systems Engineer.</div><a href="javascript:setcontent('24','front_content.php?action=10&idcat=2&idart=24&idartlang=24&type=CMS_HTMLHEAD&typenr=2&contenido=9b0b5c676e2dc9833370491e2e10beb8')">
<img src="http://www.hard-soft.at/contenido/images/but_edithead.gif" border="0"></a>
<a href="javascript:setcontent('24','0')"><img src="http://www.hard-soft.at/contenido/images/but_speichern.gif" border="0"></a></div>
                <div id="HTML_2_1" onFocus="this.style.border=\'1px solid #bb5577\'" onBlur="this.style.border=\'1px dashed #bfbfbf\'" style="border:1px dashed #bfbfbf" contentEditable="true" ><!--StartFragment --><span style="FONT-WEIGHT: bold"></span></div><a href="javascript:setcontent(\'24\',\'front_content.php?action=10&idcat=2&idart=24&idartlang=24&type=CMS_HTML&typenr=1&lang=1&contenido=9b0b5c676e2dc9833370491e2e10beb8\')">
<img src="http://www.hard-soft.at/contenido/images/but_edithtml.gif" border="0"></a>
<a href="javascript:setcontent(\'24\',\'0\')"><img src="http://www.hard-soft.at/contenido/images/but_speichern.gif" border="0">   </a>                
<br /><br /><strong>Artikeloptionen</strong><br />
Verfasst von : Alexander Fill<br />
Letzte Änderung: 03.12.2004 13:40
 
            </div>
        </div>	
    </div>
    <div id="foot">
        © hard-soft informationstechnologie gmbh - <a href="#top" title="zum Seitenanfang">top</a>
    </div>
</div>

<form name="editcontent" method="post" action="front_content.php?area=con_editcontent&idart=24&idcat=2&lang=1&action=20&contenido=9b0b5c676e2dc9833370491e2e10beb8">
<input type="hidden" name="changeview" value="edit">
<input type="hidden" name="data" value="">
<input type="hidden" name="con_class" value="">
</form></body>
</html>

foo
Is nur beim Text (html) so dass die Sachen escaped werden.
KOmisch ...
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

stimmt...

wie sieht denn dein html modul aus ?
*** make your own tools (wishlist :: thx)
holunda
Beiträge: 71
Registriert: Di 4. Mai 2004, 10:14
Kontaktdaten:

Beitrag von holunda »

du meinst der "normale Quellcode"?
siehe www.hard-soft.at
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

ach so
kommt dir das bekannt vor
[06-Dec-2004 11:25:36] PHP Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in e:\contenido\contenido\includes\include.con_editcontent.php(616) : eval()'d code on line 693

grund ist der das in meinem modul etwas wie

echo 'CMS_HTML[1]';
steht...

contenido erwartet immer
echo "CMS_HTML[1]";
*** make your own tools (wishlist :: thx)
holunda
Beiträge: 71
Registriert: Di 4. Mai 2004, 10:14
Kontaktdaten:

Beitrag von holunda »

hmmm hatte eigentlich da nichts verändert, es hat ja zuvor funktioniert.

Der kommt bei mir:
[06-Dez-2004 10:18:44] PHP Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /home/www/kmm212/html/contenido/includes/functions.mod.php(164) : eval()'d code on line 8

Kann es auch daran liegen? Siehe auch errorlog in meinem ersten Post.

Meine einzige ausgabe des HTML Parts:

Code: Alles auswählen

<?php 

function TagsToLower($value)
{
   $value = preg_replace(',<(/?)([a-zA-Z]+)([^>]+)?(/?)>,ie', '"<\1".strtolower("\2")."\3\4>"', $value);
   return $value;
}

$content = "CMS_HTML[1]";
$content = TagsToLower($content);
$content = preg_replace("/<br>/","<br />",$content);
echo $content;


?>
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

ach so...

ähm ja ist mir eigentlich klar warum...

Code: Alles auswählen

function TagsToLower($value) 
{ 
   $value = preg_replace(',<(/?)([a-zA-Z]+)([^>]+)?(/?)>,ie', '"<\1".strtolower("\2")."\3\4>"', $value); 
   return $value; 
}
bei ersetzungen mittels preg_replace ist der zweite parameter von '
umschlossen...

das heisst alle vorkommenden zeichen von ' werden mittels \' innerhalb des neu zusammengebauten strings escaped...

ist so ne nette eigenart von php ;-)

diese müssten mittels

Code: Alles auswählen

$value = str_replace("\'", "'", $value);
wieder entfernt werden...
sollte einfach vor return $value; ergänzt werden...
*** make your own tools (wishlist :: thx)
holunda
Beiträge: 71
Registriert: Di 4. Mai 2004, 10:14
Kontaktdaten:

Beitrag von holunda »

siehe edit meines letzten posts, da ist der code
emergence
Beiträge: 10653
Registriert: Mo 28. Jul 2003, 12:49
Wohnort: Austria
Kontaktdaten:

Beitrag von emergence »

die funktion war an sich ja für die functions.con.php bestimmt... ;-)
ich hab das damals nicht berücksichtigt da der spaw sowieso ein problem mit javascript befehlen innerhalb von code hat. (ist ja meine funktion)
*** make your own tools (wishlist :: thx)
holunda
Beiträge: 71
Registriert: Di 4. Mai 2004, 10:14
Kontaktdaten:

Beitrag von holunda »

danke emergence
Jetzt klappt alles wunderbar
Gesperrt