Seite 1 von 1
[SOLVED][PluginError] in Browser-Console: Con is not defined
Verfasst: Fr 1. Aug 2014, 13:59
von rethus
Ich habe einen Fehler in 2 Plugins, die ich nicht so recht zu interpretieren weiß.
Es scheint, das die Config (scheinbar ein jquery-Modul) nicht initiiert werden kann. Weitere Fehlermeldungen gibt es aber leider nicht, als die die im Screenshot zu sehen sind. Also soll heißen, dass im Logsystem von Contenido keine Fehler dazu angezeigt werden.
Bin für jeden Tipp dankbar.
Re: Error in Browser-Console: Con is not defined
Verfasst: Fr 1. Aug 2014, 16:42
von rethus
Wenn ich aus dem linken Menü folgende Datei lade, wird dieser oben genannte Fehler 3 mal in der Konsole geworfen:
Code: Alles auswählen
<?php
defined('CON_FRAMEWORK') || die('Illegal call: Missing framework initialization - request aborted.');
// ###############
// Initialization
// ###############
if (!is_object($oTpl)) {
$oTpl = new cTemplate();
}
if (!is_object($oDB)) {
$oDB = cRegistry::getDb();
}
$oUser = new cApiUser($auth->auth["uid"]);
$oClient = new cApiClient($client);
$oClientLang= new cApiClientLanguage(false, $client, $lang);
$oLink = new cHTMLLink();
$oLink->setMultiLink("xst_contactTeaser_pro_mainContact", "", "xst_contactTeaser_pro_mainContact", "cTeaserPro_main");
$oLink->updateAttributes(array('class' => 'addfunction'));
$oLink->setContent(i18n("Kontakt erzeugen", 'xst_contactTeaser'));
$o1Link = new cHTMLLink();
$o1Link->setMultiLink("xst_contactTeaser_pro_address", "", "xst_contactTeaser_pro_address", "cTeaserPro_address");
$o1Link->updateAttributes(array('class' => 'addfunction'));
$o1Link->setContent(i18n("Adresse erzeugen", 'xst_contactTeaser_address'));
$sButtonRow = '
<div class="leftTopAction">
<div class="cT_sectionBTN">' . $oLink->render() .'</div><div class="cT_sectionBTN">'. $o1Link->render(). '</div>
</div>
';
$oTpl->set('s', 'BUTTONROW', $sButtonRow);
unset($sButtonRow);
$oTpl->set('s', 'SESSID', $sess->id);
$oTpl->generate($cfg['plugins']['cTpro']['path'] . '/templates/standard/left_top.html');
Re: Error in Browser-Console: Con is not defined
Verfasst: Fr 1. Aug 2014, 16:45
von rethus
Die dazugehörige Template-Datei sieht so aus:
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title></title>
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="styles/jquery/jquery-ui.css">
<style type="text/css">
body {
background: #fff;
}
#top_left_container {
margin: 1px 0 0 0;
border: 1px solid #b3b3b3;
padding-top: 7px;
}
</style>
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="scripts/HTMLObj.js"></script>
<script type="text/javascript" src="scripts/rowMark.js"></script>
<script type="text/javascript" src="scripts/contenidoConfig.js"></script>
<script type="text/javascript" src="scripts/infoBox.js"></script>
<script type="text/javascript" src="scripts/general.js"></script>
<script type="text/javascript" src="scripts/cfoldingrow.js"></script>
<script type="text/javascript" src="scripts/parameterCollector.js"></script>
</head>
<body onload="top.content.left.document.getElementById('framesetleft').rows='29,55,*'">
<div id="top_left_container">
{BUTTONROW}
</div>
</body>
</html>
Re: Error in Browser-Console: Con is not defined
Verfasst: Fr 1. Aug 2014, 17:01
von rethus
Ok, habe die Lösung gefunden.
Scheinbar hat sich auch etwas in den Template-Files geändert. Dort wird nun contenido.js und general.js geladen.
Hier ein exemplarisches Beispiel an einer Datei:
Vorher:
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title></title>
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="styles/jquery/jquery-ui.css">
<style type="text/css">
body {
background: #fff;
}
#top_left_container {
margin: 1px 0 0 0;
border: 1px solid #b3b3b3;
padding-top: 7px;
}
</style>
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="scripts/HTMLObj.js"></script>
<script type="text/javascript" src="scripts/rowMark.js"></script>
<script type="text/javascript" src="scripts/contenidoConfig.js"></script>
<script type="text/javascript" src="scripts/infoBox.js"></script>
<script type="text/javascript" src="scripts/general.js"></script>
<script type="text/javascript" src="scripts/cfoldingrow.js"></script>
<script type="text/javascript" src="scripts/parameterCollector.js"></script>
</head>
<body onload="top.content.document.getElementById('contentFrame').cols='350,*';">
<div id="top_left_container">
{DATA}
</div>
</body>
</html>
Nachher:
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title></title>
<meta http-equiv="expires" content="0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<link rel="stylesheet" type="text/css" href="styles/contenido.css">
<link rel="stylesheet" type="text/css" href="styles/jquery/jquery-ui.css">
<script type="text/javascript" src="scripts/jquery/jquery.js"></script>
<script type="text/javascript" src="scripts/jquery/jquery-ui.js"></script>
<script type="text/javascript" src="scripts/contenido.js"></script>
<script type="text/javascript" src="scripts/general.js"></script>
<style type="text/css">
body {
background: #fff;
}
#top_left_container {
margin: 1px 0 0 0;
border: 1px solid #b3b3b3;
padding-top: 7px;
}
</style>
<script type="text/javascript" src="scripts/HTMLObj.js"></script>
<script type="text/javascript" src="scripts/rowMark.js"></script>
<script type="text/javascript" src="scripts/contenidoConfig.js"></script>
<script type="text/javascript" src="scripts/infoBox.js"></script>
<script type="text/javascript" src="scripts/general.js"></script>
<script type="text/javascript" src="scripts/cfoldingrow.js"></script>
<script type="text/javascript" src="scripts/parameterCollector.js"></script>
</head>
<body onload="top.content.document.getElementById('contentFrame').cols='350,*';">
<div id="top_left_container">
{DATA}
</div>
</body>
</html>
jQuery muss also nach oben gezogen werden und dahinter contenido.js und general.js.
Wurde dies schon dokumentiert? Wenn nicht wäre es gut, eine Info im Forum rauszugeben, damit jeder, der ein Plugin gebaut hat, bei einem Upgrade von Contenido nicht vor den gleichen Problemen steht, und erst aufwendig Suchen muss.
Re: [SOLVED][PluginError] in Browser-Console: Con is not def
Verfasst: Do 7. Aug 2014, 07:28
von frederic.schneider_4fb
Die dbzgl. genannten Änderungen sind eigentlich schon eine Weile her (wenn ich gerade nichts übersehen habe):
https://git.contenido.org/projects/CON/ ... meset.html
Wir hatten damals angekündigt:
http://www.contenido.org/de/cms/CONTENI ... 015-3.html