Seite 1 von 1
Parse error in c4.6.4
Verfasst: Mo 19. Dez 2005, 23:28
von kypta
Habe eine c4.6.4 "nackt" installiert (nur die Beispielmodule), selber ein Layout und Template erstellt, als einzigen Container ein Text HTML einbaut, eine Kategorie online geschaltet und einen Artikel erstellt und ebenfalls online geschaltet. Dann wollte ich den Artikel editieren:
Parse error: parse error, unexpected T_STRING in /home/httpd/vhosts/meine.domain/httpdocs/contenido/includes/include.con_editcontent.php(644) : eval()'d code on line 2
Das Selbe auch in der Vorschau.
Hier das Layout
Code: Alles auswählen
<?xml version="1.0" encoding="iso-8859-1"?>
<!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">
<head>
<title>Titel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<container id="1" name="Text HTML" types="Content" mode="optional" default=""></container>
</body>
</html>
Der Code im Modul ist das Contenido-Standard Text HTML
Code: Alles auswählen
<?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Text HTML
* Author(s) : Andreas Lindner
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 05.08.2005
************************************************/
echo "<p>"."CMS_HTML[1]"."</p>";
?>
Die Änderungen in
http://contenido.org/forum/viewtopic.php?p=65184#65184 sowie in
http://www.contenido.org/forum/viewtopi ... 4651#64651 habe ich gemacht.
Ideen?
Gruss
Thomas
Verfasst: Di 20. Dez 2005, 09:50
von emergence
contenido/includes/config.misc.php
findest du
Code: Alles auswählen
/* To output the code when editing and browsing the frontend, set
this to true */
$cfg["debug"]["codeoutput"] = false;
das false änderst du mal auf true...
es sollte dir dann der code angezeigt werden der bei zeile 2 den fehler bringt...
Verfasst: Di 20. Dez 2005, 15:19
von kypta
Hier also der Code:
Code: Alles auswählen
<?xml version="1.0" encoding="iso-8859-1"?>
<!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">
<head>
<title>Titel</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<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(idartlang, act) {
if (document.all) {
document.getElementsByTagName = function (str) {
if (str=="*")
return document.all;
else
return document.all.tags(str);
}
}
var a = document.getElementsByTagName("*");
var str = '';
var aId = '';
// loop through all elements
for (var i=0; i < a.length; i++) {
aId = a[i].id;
if (aId != '' && typeof aId == 'string') {
var 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) {
// split the idname in data
var data = aId.split("_");
// data[0] is the fieldname * needed
// data[1] is the idtype
// data[2] is the typeid * needed
// read out the content
var aContent = prepareString(a[i].innerHTML);
// build the string which will be send
str += buildDataEntry(idartlang , data[0] , data[2] , aContent);
}
}
}
}
// set the string
document.forms.editcontent.data.value = str + document.forms.editcontent.data.value;
// 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();
}
function prepareString(aContent) {
if ( aContent == " " || aContent == "" ) {
aContent = "%$%EMPTY%$%";
} 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(/\|/,"%$%SEPERATOR%$%");
}
}
return aContent;
}
function buildDataEntry(idartlang, type, typeid, value) {
return idartlang +'|'+ type +'|'+ typeid +'|'+ value +'||';
}
function addDataEntry(idartlang, type, typeid, value) {
document.forms.editcontent.data.value = (buildDataEntry(idartlang, type, typeid, prepareString(value) ) );
setcontent(idartlang,'0');
}
</script>
<script src="http://meine.domain/contenido/external/mozile/mozileLoader.js" type="text/javascript"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<?php ?>
<?php $cCurrentModule = 2; ?><?php $cCurrentContainer = 1; ?><?php
/***********************************************
* CONTENIDO MODUL - OUTPUT
*
* Modulname : Text HTML
* Author(s) : Andreas Lindner
* Copyright : Contenido - four for business, Andreas Lindner
* Created : 05.08.2005
************************************************/
echo "<p>"."<div id=\"HTML_2_1\" onfocus=\"this.style.border='1px solid #bb5577';\" onblur=\"this.style.border='1px dashed #bfbfbf';\" contenteditable=\"true\" style=\"border: 1px dashed #bfbfbf;direction: ltr;\"> </div><a id=\"m2\" href=\"javascript:setcontent('1','front_content.php?action=10&idcat=1&idart=1&idartlang=1&type=CMS_HTML&typenr=1&contenido=41d348d08422d0ea7f8b2bd6280f27ed');\"><img id=\"m3\" src=\"http://meine.domain/contenido/images/but_edithtml.gif\" border=\"0\" style=\"margin-right: 2px;\" /></a><a id=\"m4\" href=\"javascript:setcontent('1','0')\"><img id=\"m5\" src=\"http://meine.domain/contenido/images/but_speichern.gif\" border=\"0\" /></a>"."</p>";
?>
<form name="editcontent" method="post" action="front_content.php?area=con_editcontent&idart=1&idcat=1&lang=1&action=20&contenido=41d348d08422d0ea7f8b2bd6280f27ed">
<input type="hidden" name="changeview" value="edit">
<input type="hidden" name="data" value="">
<input type="hidden" name="con_class" value="">
</form></body>
</html>
Gruss
Thomas
Verfasst: Di 20. Dez 2005, 15:25
von emergence
nimm das aus deinem layout raus
Verfasst: Di 20. Dez 2005, 15:50
von kypta
Oh, ja Du hast recht

. Da ein "anständiges" xhtml-Dokument diese Zeile aber hat, habe ich sie nicht rausgenommen sondern ersetzt mit:
Code: Alles auswählen
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
Das geht jetzt

.
Danke und Gruss
Thomas
Verfasst: Mo 30. Jan 2006, 11:25
von firemag
In welcher Datei soll das
Code:
<?php echo "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?".">"; ?>
denn geändert werden. Das kommt hier irgendwie nicht richtig raus.
Bitte um Aufklärung.
Verfasst: Mo 30. Jan 2006, 11:30
von rezeptionist
in dein Layout erste zeile
Verfasst: Mo 30. Jan 2006, 11:34
von kypta
Im Layout der Webseiten, die Du erstellen willst. Also in den Dateien, die Du unter "Style" -> "Layout" erstellst.
Verfasst: Mo 30. Jan 2006, 14:30
von firemag
Eine Datei, welche die Grundlage der Style-Layout bildet, gibt es doch sicher auch, oder?
Da könnte der Code doch schon eingefügt bzw. angepasst werden.
Gruß
Firemag
Verfasst: Mo 30. Jan 2006, 14:33
von Dodger77
firemag hat geschrieben:Eine Datei, welche die Grundlage der Style-Layout bildet, gibt es doch sicher auch, oder?
Da könnte der Code doch schon eingefügt bzw. angepasst werden.
Nein, eine solche Datei gibt es nicht. Und man muss die Zeile ja nicht am Anfang seines Layouts haben. Die macht ja höchstens Sinn, wenn man XHTML ausliefern möchte.