contao / core

Contao 3 → see contao/contao for Contao 4
GNU Lesser General Public License v3.0
492 stars 213 forks source link

tinyMCE css files not loaded completely when using ssl proxy. #3616

Closed ghost closed 12 years ago

ghost commented 12 years ago

When I try to use the tinyMCE in the backend to edit an article the tinyMCE editor is not correctly displayed and therefore not really useable. It looks like some style files are not found. Please note the missing target domain name in the error messages (from Firefox) below. In localconfig.php I have:

if ($_SERVER['HTTP_X_FORWARDED_HOST'] == "ssl.webpack.de")
{
$_SERVER['HTTPS'] = 1;
}

The error messages:

[08:27:37.806] GET https://ssl.webpack.de/plugins/tinyMCE/themes/advanced/skins/default/ui.css [HTTP/1.1 404 Not Found 415ms]
[08:27:37.813] GET https://ssl.webpack.de/plugins/tinyMCE/plugins/inlinepopups/skins/clearlooks2/window.css [HTTP/1.1 404 Not Found 381ms]
[08:27:37.819] GET https://ssl.webpack.de/plugins/tinyMCE/plugins/typolinks/img/link.gif [HTTP/1.1 404 Not Found 397ms]
[08:27:37.825] GET https://ssl.webpack.de/plugins/tinyMCE/plugins/typolinks/img/image.gif [HTTP/1.1 404 Not Found 458ms]
[08:27:37.832] GET https://ssl.webpack.de/plugins/tinyMCE/themes/advanced/skins/default/content.css [HTTP/1.1 404 Not Found 477ms]
[08:27:37.838] GET https://ssl.webpack.de/plugins/tinyMCE/plugins/spellchecker/css/content.css [HTTP/1.1 404 Not Found 479ms]
[08:27:37.844] GET https://ssl.webpack.de/system/themes/tinymce.css [HTTP/1.1 404 Not Found 529ms]
[08:27:37.851] GET https://ssl.webpack.de/tl_files/tinymce.css [HTTP/1.1 404 Not Found 557ms]

The problem has been verified using a fresh installation of a contao 2.10.3 demo (music academy) website.

--- Originally created by GAN on November 10th, 2011, at 09:08pm (ID 3616)

leofeyer commented 12 years ago

Does this issue occur with TinyMCE alone, too? Did you report it to the TinyMCE developers?

G-A-N commented 12 years ago

I just checked it using version 3.4.7 of TinyMCE and the HE ssl proxy. It works like expected, this means no problems. All toolbars visible and usable. I didn't report anything to the TinyMCE developers.

leofeyer commented 12 years ago

What does the generated TinyMCE code in the page source look like?

G-A-N commented 12 years ago

This is the page source. As you might notice this time I used the 1und1 ssl proxy.

<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<!--

    This website is powered by Contao Open Source CMS :: Licensed under GNU/LGPL
    Copyright ©2005-2012 by Leo Feyer :: Extensions are copyright of their respective owners
    Visit the project website at http://www.contao.org for more information

//-->
<title>Contao Open Source CMS - Contao Open Source CMS 2.10</title>
<base href="https://ssl.kundenserver.de/test.mydomain.de/">
<link rel="stylesheet" href="system/scripts/547b05bb4ef7.css" media="all">
<!--[if IE]><link rel="stylesheet" href="system/themes/default/iefixes.css" media="screen"><![endif]-->
<script>
var CONTAO_THEME = 'default';
var CONTAO_COLLAPSE = 'Bereich schließen';
var CONTAO_EXPAND = 'Bereich öffnen';
var CONTAO_SCRIPT_URL = '';
var REQUEST_TOKEN = '6a98a5a27731e4dfb49b6f5e76465e06';
</script>
<script src="system/scripts/b57562fda582.js"></script>
<!--[if lt IE 9]><script src="plugins/html5shim/html5-1.6.2.js"></script><![endif]-->
<script src="https://ssl.kundenserver.de/test.mydomain.de/plugins/tinyMCE/tiny_mce_gzip.js"></script>
<script>
tinyMCE_GZ.init({
  plugins : "advimage,autosave,directionality,emotions,inlinepopups,paste,save,searchreplace,spellchecker,style,tabfocus,table,template,typolinks,xhtmlxtras",
  themes : "advanced",
  languages : "de",
  disk_cache : false,
  debug : false
});
</script>
<script>
tinyMCE.init({
  mode : "none",
  height : "300",
  language : "de",
  elements : "ctrl_text",
  remove_linebreaks : false,
  force_hex_style_colors : true,
  fix_list_elements : true,
  fix_table_elements : true,
  doctype : '<!DOCTYPE html>',
  element_format : 'html',
  document_base_url : "https://ssl.kundenserver.de/test.mydomain.de/",
  entities : "160,nbsp,60,lt,62,gt,173,shy",
  cleanup_on_startup : true,
  save_enablewhendirty : true,
  save_on_tinymce_forms : true,
  init_instance_callback : "TinyCallback.getScrollOffset",
  advimage_update_dimensions_onchange : false,
  external_image_list_url : "/plugins/tinyMCE/plugins/typolinks/typoimages.php",
  template_external_list_url : "/plugins/tinyMCE/plugins/typolinks/typotemplates.php",
  plugins : "advimage,autosave,directionality,emotions,inlinepopups,paste,save,searchreplace,spellchecker,style,tabfocus,table,template,typolinks,xhtmlxtras",
  spellchecker_languages : "+Deutsch=de,Englisch=en",
  content_css : "/system/themes/tinymce.css,/tl_files/tinymce.css",
  event_elements : "a,div,h1,h2,h3,h4,h5,h6,img,p,span",
  extended_valid_elements : "q[cite|class|title],article,section,hgroup,figure,figcaption",
  tabfocus_elements : ":prev,:next",
  theme : "advanced",
  theme_advanced_resizing : true,
  theme_advanced_resize_horizontal : false,
  theme_advanced_toolbar_location : "top",
  theme_advanced_toolbar_align : "left",
  theme_advanced_statusbar_location : "bottom",
  theme_advanced_source_editor_width : "700",
  theme_advanced_blockformats : "div,p,address,pre,h1,h2,h3,h4,h5,h6",
  theme_advanced_buttons1 : "newdocument,save,separator,spellchecker,separator,anchor,separator,typolinks,unlink,separator,image,typobox,separator,sub,sup,separator,abbr,separator,styleprops,attribs,separator,search,replace,separator,undo,redo,separator,removeformat,cleanup,separator,code",
  theme_advanced_buttons2 : "formatselect,fontsizeselect,styleselect,separator,bold,italic,underline,separator,justifyleft,justifycenter,justifyright,justifyfull,separator,bullist,numlist,indent,outdent,separator,blockquote,separator,forecolor,backcolor",
  theme_advanced_buttons3 : "tablecontrols,separator,template,separator,charmap,emotions,separator,help",
  theme_advanced_font_sizes : "9px,10px,11px,12px,13px,14px,15px,16px,17px,18px,19px,20px,21px,22px,23px,24px"
});
</script>
</head>
<body id="top" class="unix firefox fx9">

<!--[if lte IE 6]>
<div style="background:#ffc;padding:12px;border-bottom:1px solid #e4790f;font-size:14px;color:#000;text-align:center;"><strong>Achtung!</strong> Sie verwenden einen <a href="http://ie6countdown.com" style="font-size:14px;color:#e4790f;">veralteten Browser</a> und <strong>können nicht alle Funktionen dieser Webseite nutzen</strong>.</div>
<![endif]-->

<div id="header">

<h1>Contao Open Source CMS 2.10.3</h1>

<div>
<span class="header_user_container"><a href="https://ssl.kundenserver.de/test.mydomain.de/contao/main.php?do=login" class="header_user" title="Persönliche Daten">Benutzer k.jones</a> &nbsp; :: &nbsp; </span>
<span class="header_preview_container"><a href="contao/preview.php?site=index.php/academy/articles/the-academy.html" onclick="window.open(this.href); return false;" class="header_preview" title="Frontend-Vorschau" accesskey="f">Frontend-Vorschau</a> &nbsp; :: &nbsp; </span>
<span class="header_home_container"><a href="https://ssl.kundenserver.de/test.mydomain.de/contao/main.php" class="header_home" title="Startseite" accesskey="h">Startseite</a> &nbsp; :: &nbsp; </span>
<span class="header_logout_container"><a href="https://ssl.kundenserver.de/test.mydomain.de/contao/index.php" class="header_logout" title="Abmelden" accesskey="q">Abmelden</a></span>
</div>

</div>

<div id="container">
<div id="left">

<div id="tl_navigation">

<h1>Backend-Module</h1>

<a href="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23#skipNavigation" class="invisible">Navigation überspringen</a>

<ul class="tl_level_1">
<li class="tl_level_1_group"><a href="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23&amp;mtg=content" title="Bereich schließen" onclick="return AjaxRequest.toggleNavigation(this, 'content');"><img src="system/themes/default/images/modMinus.gif" width="16" height="16" alt="">Inhalte</a></li>
<li class="tl_parent" id="content">
<ul class="tl_level_2">
  <li><a href="contao/main.php?do=article" class="navigation article active" title="Artikel und Inhaltselemente verwalten.">Artikel</a></li>
  <li><a href="contao/main.php?do=news" class="navigation news" title="Nachrichten verwalten und als RSS- oder Atom-Feed exportieren.">Nachrichten</a></li>
  <li><a href="contao/main.php?do=calendar" class="navigation calendar" title="Events verwalten und als Kalender oder Eventliste ausgeben." style="background-image:url('system/modules/calendar/html/icon.gif');">Events</a></li>
  <li><a href="contao/main.php?do=faq" class="navigation faq" title="Häufig gestellte Fragen verwalten." style="background-image:url('system/modules/faq/html/icon.gif');">FAQ</a></li>
  <li><a href="contao/main.php?do=newsletter" class="navigation newsletter" title="Abonnements verwalten und Newsletter versenden." style="background-image:url('system/modules/newsletter/html/icon.gif');">Newsletter</a></li>
  <li><a href="contao/main.php?do=form" class="navigation form" title="Individuelle Formulare gestalten und deren Daten speichern oder versenden.">Formulargenerator</a></li>
  <li><a href="contao/main.php?do=comments" class="navigation comments" title="Kommentare bzw. Gästebuch-Einträge verwalten." style="background-image:url('system/modules/comments/html/icon.gif');">Kommentare</a></li>
</ul>
</li>
<li class="tl_level_1_group"><a href="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23&amp;mtg=design" title="Bereich schließen" onclick="return AjaxRequest.toggleNavigation(this, 'design');"><img src="system/themes/default/images/modMinus.gif" width="16" height="16" alt="">Layout</a></li>
<li class="tl_parent" id="design">
<ul class="tl_level_2">
  <li><a href="contao/main.php?do=themes" class="navigation themes" title="Frontend-Module, Stylesheets, Seitenlayouts und Templates verwalten.">Themes</a></li>
  <li><a href="contao/main.php?do=page" class="navigation page" title="Die Seitenstruktur der Webseite(n) erstellen.">Seitenstruktur</a></li>
  <li><a href="contao/main.php?do=tpl_editor" class="navigation tpl_editor" title="Templates im Backend bearbeiten." style="background-image:url('system/modules/tpl_editor/html/icon.gif');">Templates</a></li>
</ul>
</li>
<li class="tl_level_1_group"><a href="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23&amp;mtg=accounts" title="Bereich schließen" onclick="return AjaxRequest.toggleNavigation(this, 'accounts');"><img src="system/themes/default/images/modMinus.gif" width="16" height="16" alt="">Benutzerverwaltung</a></li>
<li class="tl_parent" id="accounts">
<ul class="tl_level_2">
  <li><a href="contao/main.php?do=member" class="navigation member" title="Mitgliederkonten verwalten (Frontend-Benutzer).">Mitglieder</a></li>
  <li><a href="contao/main.php?do=mgroup" class="navigation mgroup" title="Mitgliedergruppen verwalten (Frontend-Benutzergruppen).">Mitgliedergruppen</a></li>
  <li><a href="contao/main.php?do=user" class="navigation user" title="Benutzerkonten verwalten (Backend-Benutzer).">Benutzer</a></li>
  <li><a href="contao/main.php?do=group" class="navigation group" title="Benutzergruppen verwalten (Backend-Benutzergruppen).">Benutzergruppen</a></li>
</ul>
</li>
<li class="tl_level_1_group"><a href="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23&amp;mtg=system" title="Bereich schließen" onclick="return AjaxRequest.toggleNavigation(this, 'system');"><img src="system/themes/default/images/modMinus.gif" width="16" height="16" alt="">System</a></li>
<li class="tl_parent" id="system">
<ul class="tl_level_2">
  <li><a href="contao/main.php?do=files" class="navigation files" title="Dateien und Ordner verwalten oder neue Dateien auf den Server übertragen.">Dateiverwaltung</a></li>
  <li><a href="contao/main.php?do=log" class="navigation log" title="Das System-Log durchsuchen und die Aktivität auf der Webseite analysieren.">System-Log</a></li>
  <li><a href="contao/main.php?do=settings" class="navigation settings" title="Die Contao-Konfiguration prüfen und optimieren.">Einstellungen</a></li>
  <li><a href="contao/main.php?do=maintenance" class="navigation maintenance" title="Contao warten oder aktualisieren.">Systemwartung</a></li>
  <li><a href="contao/main.php?do=repository_catalog" class="navigation repository_catalog" title="Das Extension Repository durchsuchen und Erweiterungen installieren." style="background-image:url('system/modules/rep_client/themes/default/images/catalog16.png');">Erweiterungskatalog</a></li>
  <li><a href="contao/main.php?do=repository_manager" class="navigation repository_manager" title="Installierte Erweiterungen verwalten oder entfernen." style="background-image:url('system/modules/rep_client/themes/default/images/install16.png');">Erweiterungsverwaltung</a></li>
</ul>
</li>
<li class="tl_level_1_group"><a href="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23&amp;mtg=profile" title="Bereich schließen" onclick="return AjaxRequest.toggleNavigation(this, 'profile');"><img src="system/themes/default/images/modMinus.gif" width="16" height="16" alt="">Benutzerfunktionen</a></li>
<li class="tl_parent" id="profile">
<ul class="tl_level_2">
  <li><a href="contao/main.php?do=undo" class="navigation undo" title="Gelöschte Datensätze wiederherstellen.">Rückgängig</a></li>
  <li><a href="contao/main.php?do=login" class="navigation login" title="Persönliche Daten ändern oder ein neues Passwort setzen.">Persönliche Daten</a></li>
  <li><a href="contao/main.php?do=tasks" class="navigation tasks" title="Anderen Backend-Benutzern Aufgaben zuweisen.">Task Center</a></li>
</ul>
</li>
</ul>

<a id="skipNavigation" class="invisible">&nbsp;</a>

</div>

</div>

<div id="main">

<h1 class="main_headline">Artikel</h1>

<div id="tl_buttons">
<a href="contao/main.php?do=article&amp;table=tl_content&amp;id=17" class="header_back" title="Zurück" accesskey="b" onclick="Backend.getScrollOffset();">Zurück</a>
</div>

<h2 class="sub_headline">Datensatz ID 23 bearbeiten</h2>

<form action="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23" id="tl_content" class="tl_form" method="post" enctype="application/x-www-form-urlencoded">
<div class="tl_formbody_edit">
<input type="hidden" name="FORM_SUBMIT" value="tl_content">
<input type="hidden" name="REQUEST_TOKEN" value="6a98a5a27731e4dfb49b6f5e76465e06">
<input type="hidden" name="FORM_FIELDS[]" value="{type_legend},type,headline;{text_legend},text;{image_legend},addImage;{protected_legend:hide},protected;{expert_legend:hide},guests,invisible,cssID,space">

<fieldset id="pal_type_legend" class="tl_tbox block">
<legend onclick="AjaxRequest.toggleFieldset(this, 'type_legend', 'tl_content')">Elementtyp</legend>
<div>
  <h3><label for="ctrl_type">Elementtyp</label> <a href="contao/help.php?table=tl_content&amp;field=type" title="Hilfe-Assistent" rel="lightbox[help 610 80%]"><img src="system/themes/default/images/about.gif" width="14" height="14" alt="Hilfe-Assistent" style="vertical-align:text-bottom;"></a></h3>
  <select name="type" id="ctrl_type" class="tl_select" onchange="Backend.autoSubmit('tl_content');" onfocus="Backend.getScrollOffset();"><optgroup label="&nbsp;Text-Elemente"><option value="headline">Überschrift</option><option value="text" selected="selected">Text</option><option value="html">HTML</option><option value="list">Aufzählung</option><option value="table">Tabelle</option><option value="accordion">Akkordeon</option><option value="code">Code</option></optgroup><optgroup label="&nbsp;Link-Elemente"><option value="hyperlink">Hyperlink</option><option value="toplink">Top-Link</option></optgroup><optgroup label="&nbsp;Bild-Elemente"><option value="image">Bild</option><option value="gallery">Galerie</option></optgroup><optgroup label="&nbsp;Datei Elemente"><option value="download">Download</option><option value="downloads">Downloads</option></optgroup><optgroup label="&nbsp;Include-Elemente"><option value="article">Artikel</option><option value="alias">Inhaltselement</option><option value="form">Formular</option><option value="module">Modul</option><option value="teaser">Artikelteaser</option><option value="comments">Kommentare</option></optgroup></select>
  <p class="tl_help tl_tip">Bitte wählen Sie den Typ des Inhaltselements.</p>
</div>
<div>
  <h3><label for="ctrl_headline">Überschrift</label></h3>
  <input type="text" name="headline[value]" id="ctrl_headline" class="tl_text_unit" value="Why do we need roles?" maxlength="255" onfocus="Backend.getScrollOffset();"> <select name="headline[unit]" class="tl_select_unit" onfocus="Backend.getScrollOffset();"><option value="h1" selected="selected">h1</option><option value="h2">h2</option><option value="h3">h3</option><option value="h4">h4</option><option value="h5">h5</option><option value="h6">h6</option></select>
  <p class="tl_help tl_tip">Hier können Sie dem Inhaltselement eine Überschrift hinzufügen.</p>
</div>
</fieldset>

<fieldset id="pal_text_legend" class="tl_box block">
<legend onclick="AjaxRequest.toggleFieldset(this, 'text_legend', 'tl_content')">Text/HTML/Code</legend>
<div>
  <h3><label for="ctrl_text">Text</label> <a href="contao/help.php?table=tl_content&amp;field=text" title="Hilfe-Assistent" rel="lightbox[help 610 80%]"><img src="system/themes/default/images/about.gif" width="14" height="14" alt="Hilfe-Assistent" style="vertical-align:text-bottom;"></a></h3>
  <textarea name="text" id="ctrl_text" class="tl_textarea" rows="12" cols="80" onfocus="Backend.getScrollOffset();">Imagine that you and a friend of yours are managing a website. Maybe you are a successful web designer whereas your friend has no idea about CSS but is a committed writer. Therefor, you have decided to share the work. In the future, you will be doing the design and administration of the website and your friend will be writing articles. This is a basic principle of any CMS by the way - separation of content and design.&lt;br /&gt;
&lt;br /&gt;
Now, as both of you have to have access to the back end, your friend would still be able to edit the look of the website or to create new user accounts, although he is actually not responsible for design or administration. Therefor, you want to disable these functions for his account. At this point, you have created a role (although it exists in your mind only) that you could name &quot;editor&quot; or &quot;author&quot;.&lt;br /&gt;
&lt;br /&gt;
To learn how user permissions can be restricted, let's take a closer look at the roles of our example users.
</textarea>
  <script>tinyMCE.execCommand('mceAddControl', false, 'ctrl_text');</script>
  <p class="tl_help tl_tip">Sie können HTML-Tags verwenden, um den Text zu formatieren.</p>
</div>
</fieldset>

<fieldset id="pal_image_legend" class="tl_box block">
<legend onclick="AjaxRequest.toggleFieldset(this, 'image_legend', 'tl_content')">Bild-Einstellungen</legend>
<div>
  <div id="ctrl_addImage" class="tl_checkbox_single_container"><input type="checkbox" name="addImage" id="opt_addImage_0" class="tl_checkbox" value="1" onclick="AjaxRequest.toggleSubpalette(this, 'sub_addImage', 'addImage');" onfocus="Backend.getScrollOffset();"> <label for="opt_addImage_0">Ein Bild hinzufügen</label></div>
  <p class="tl_help tl_tip">Dem Inhaltselement ein Bild hinzufügen.</p>
</div>
</fieldset>

<fieldset id="pal_protected_legend" class="tl_box block hide">
<legend onclick="AjaxRequest.toggleFieldset(this, 'protected_legend', 'tl_content')">Zugriffsschutz</legend>
<div>
  <div id="ctrl_protected" class="tl_checkbox_single_container"><input type="checkbox" name="protected" id="opt_protected_0" class="tl_checkbox" value="1" onclick="AjaxRequest.toggleSubpalette(this, 'sub_protected', 'protected');" onfocus="Backend.getScrollOffset();"> <label for="opt_protected_0">Element schützen</label></div>
  <p class="tl_help tl_tip">Das Inhaltselement nur bestimmten Gruppen anzeigen.</p>
</div>
</fieldset>

<fieldset id="pal_expert_legend" class="tl_box block hide">
<legend onclick="AjaxRequest.toggleFieldset(this, 'expert_legend', 'tl_content')">Experten-Einstellungen</legend>
<div class="w50 cbx">
  <div id="ctrl_guests" class="tl_checkbox_single_container"><input type="checkbox" name="guests" id="opt_guests_0" class="tl_checkbox" value="1" onfocus="Backend.getScrollOffset();"> <label for="opt_guests_0">Nur Gästen anzeigen</label></div>
  <p class="tl_help tl_tip">Das Inhaltselement verstecken sobald ein Mitglied angemeldet ist.</p>
</div>
<div class="w50 cbx">
  <div id="ctrl_invisible" class="tl_checkbox_single_container"><input type="checkbox" name="invisible" id="opt_invisible_0" class="tl_checkbox" value="1" onfocus="Backend.getScrollOffset();"> <label for="opt_invisible_0">Unsichtbar</label></div>
  <p class="tl_help tl_tip">Das Element auf der Webseite nicht anzeigen.</p>
</div>
<div class="w50 clr">
  <h3><label for="ctrl_cssID">CSS-ID/Klasse</label></h3>
  <div id="ctrl_cssID"><input type="text" name="cssID[]" id="ctrl_cssID_0" class="tl_text_2" value="" onfocus="Backend.getScrollOffset();"> <input type="text" name="cssID[]" id="ctrl_cssID_1" class="tl_text_2" value="" onfocus="Backend.getScrollOffset();"></div>
  <p class="tl_help tl_tip">Hier können Sie eine ID und beliebig viele Klassen eingeben.</p>
</div>
<div class="w50">
  <h3><label for="ctrl_space">Abstand davor und dahinter</label></h3>
  <div id="ctrl_space"><input type="text" name="space[]" id="ctrl_space_0" class="tl_text_2" value="" onfocus="Backend.getScrollOffset();"> <input type="text" name="space[]" id="ctrl_space_1" class="tl_text_2" value="16" onfocus="Backend.getScrollOffset();"></div>
  <p class="tl_help tl_tip">Hier können Sie den Abstand vor und nach dem Inhaltselement in Pixeln eingeben. Sie sollten Inline-Styles jedoch nach Möglichkeit vermeiden und den Abstand in einem Stylesheet definieren.</p>
</div>
</fieldset>
</div>

<div class="tl_formbody_submit">

<div class="tl_submit_container">
<input type="submit" name="save" id="save" class="tl_submit" accesskey="s" value="Speichern"> 
<input type="submit" name="saveNclose" id="saveNclose" class="tl_submit" accesskey="c" value="Speichern und schließen"> 
<input type="submit" name="saveNcreate" id="saveNcreate" class="tl_submit" accesskey="n" value="Speichern und neu"> 
<input type="submit" name="saveNback" id="saveNback" class="tl_submit" accesskey="g" value="Speichern und zurück"> 
</div>

</div>
</form>

<script>
window.addEvent('domready', function() {
  var first = $('tl_content').getElement('input[type="text"]');
  if (first) first.focus();
});
</script>
</div>

<div class="clear"></div>

</div>

<div id="footer">

<div>
<span class="footer_project_container"><a href="http://www.contao.org" class="footer_project" onclick="window.open(this.href); return false;">Contao Open Source CMS 2.10</a> &nbsp; :: &nbsp; </span>
<span class="footer_top_container"><a href="contao/main.php?do=article&amp;table=tl_content&amp;act=edit&amp;id=23#top" class="footer_top" title="Nach oben" accesskey="t">Nach oben</a> &nbsp; :: &nbsp; </span>
<span class="footer_preview_container"><a href="contao/preview.php?site=index.php/academy/articles/the-academy.html" onclick="window.open(this.href); return false;" class="footer_preview" title="Frontend-Vorschau">Frontend-Vorschau</a></span>
</div>

</div>

<script>
Mediabox.scanPage = function() {
  var links = $$('a').filter(function(el) {
    return el.rel && el.rel.test(/^lightbox/i);
  });
  var options = {
    'showCaption': false,
    'showCounter': false
  };
  $$(links).mediabox(options, null, function(el) {
    var rel0 = this.rel.replace(/[[]|]/gi,' ');
    var relsize = rel0.split(' ');
    return (this == el) || ((this.rel.length > 8) && el.rel.match(relsize[1]));
  });
};
Mediabox.enableFiletreeReload = function() {
  window.addEvent('mb_close', function() {
    AjaxRequest.reloadFiletrees();
    window.removeEvents('mb_close');
  });
};
window.addEvent('domready', Mediabox.scanPage);
window.addEvent('ajax_change', Mediabox.scanPage);
</script>

</body>
</html>
leofeyer commented 12 years ago

The error messages refer to ssl.webpack.de whereas your domain seems to be ssl.kundenserver.de.

G-A-N commented 12 years ago

Sorry, I didn't make this clear enough. I have two sites: one at HE and one at 1+1. Both show the same problem: The TinyMCE does not work together with the SSL proxy. At 1+1 I only installed the music academy template. Nothing else. No extensions. The error messages are the same (apart from the different proxy address).

leofeyer commented 12 years ago

The generated code looks ok. I have no idea I'm afraid. Anyone else having this problem?

momolinus commented 12 years ago

Hello you all,

I have exactly the same problem with SSL proxy and V-Server from strato. Hope following will help:

The menu buttons of TinyMCE seems not be able to load. If I take a look with Firebug the URI for a menu button is:

https://ssl-id1.de/plugins/tinyMCE/plugins/typolinks/img/image.gif

there is the name of my domain missing. If I call only that URI, I get the message

"Für Ihre Domain wurde kein SSL-Proxy aktiviert Als Domainbetreiber können Sie dies im Konfigurationsmenü nachholen " I think generated by any strato server.

If I add the name of my domain (e.g my-domain-xyz.org), I could access that image, which should be a button: https://ssl-id1.de/my-domain-xyz.org/plugins/tinyMCE/plugins/typolinks/img/image.gif

hope this will help little bit.

regards

G-A-N commented 12 years ago

I tried again with Contao 2.11.5 and the problems is still there. These same files are not found, when a ssl-proxy is used. I removed the leading slashes for the partial urls in the following line in tinyMCE.php: php content_css : "<?php echo TL_PATH; ?>/system/themes/tinymce.css,<?php echo TL_PATH .'/'. $this->uploadPath; ?>/tinymce.css", and at least the last two files in the list above are found now. I wasn't able to "fix" the other problems.

regards

leofeyer commented 12 years ago

However, if you remove the slash after TL_PATH, it will only work if the path is empty. Have you tried momolinus' solution?

G-A-N commented 12 years ago

Which solution? You mean whether I tried to access one of these files by typing the URL directly into the address bar of the browser? Yes, I did that. The file is accessible, but that's no solution.

leofeyer commented 12 years ago

Didn't @momolinus suggest to add the domain name in the control panel of the server?

G-A-N commented 12 years ago

No, he didn't. The bottom line of what he said is simply:

The ssl proxies in my case are configured and they work. Otherwise I would not be able to see anything at all in backend when I try to use the ssl proxies. As you can see in the page source listing above, almost everything works fine. There is only the problem with a few tinyMCE related files.

momolinus commented 12 years ago

Hello, G-A-N is right, I didn't solve the problem. I just mentioned how to fetch the missing files, to improve detecting the error.

maybe contao "forgets" to insert the domain name before the plugin folder name (in case of using an ssl-proxy) ???

regards

leofeyer commented 12 years ago

Ok, sorry then. Is it possible for you to grant me FTP access? I would like to investigate on this issue.

momolinus commented 12 years ago

hello,

yes, how can I send the access data to you?

regards.

leofeyer commented 12 years ago

Via e-mail. Please do not post it here (you would not, that is why you asked).

momolinus commented 12 years ago

Hallo Leo

an diese E-Mail-Adresse:

info (at) inetrobots.com

??

Grüße

leofeyer commented 12 years ago

Ja, oder an leo ät contao org.

leofeyer commented 12 years ago

Ok, I tracked it down and it is definitely a TinyMCE bug! Here's what's happening:

The system/config/tinyMCE.php loads TinyMCE with the correct path:

<script src="<?php echo $this->base; ?>plugins/tinyMCE/tiny_mce_gzip.js"></script>

However, the tiny_mce_gzip.js now triggers the compressor tiny_mce_gzip.php and does not pass the absolute script path. Instead, the compressor file simply assumes the base path by using $_SERVER['SCRIPT_NAME'], which is set to /plugins/tinyMCE.

And this relative path then correctly points to https://ssl-id1.de/plugins/tinyMCE, which of course is wrong in the SSL proxy environment.

You can fix this by modifying the plugins/tinyMCE/tiny_mce_gzip.php file and adding the following in line 12:

// SSL proxy patch (see #3616)
$_SERVER['SCRIPT_NAME'] = '/' . $_SERVER['SERVER_NAME'] . $_SERVER['SCRIPT_NAME'];

You should report the issue in the TinyMCE bug tracker, though, because the change is not update safe.

momolinus commented 12 years ago

thank you very much for your help,

I send a patch (with pull request) to the TinyMCE project.

G-A-N commented 12 years ago

First, I want to thank you both for your help.

But neither one of your fixes solves the problem for me. Leo's patch only works for me if I use the SSL proxy, not without. Without the proxy it creates URLs like: http://www.mydomain.de/www.mydomain.de/plugins/tinyMCE/themes/advanced/skins/default/ui.css

And it only solves part of the problem.

The two files /system/themes/tinymce.css and /tinymce.css loaded by system/config/tinyMCE.php (mentioned in #4587) are still not loaded. I still need my "fix" for these two.

momolinus' patch creates URLs like: https://ssl.webpack.de/www.mydomain.de/contao/www.mydomain.de/plugins/tinyMCE/themes/advanced/skins/default/ui.css The two files loaded from system/config/tinyMCE.php are also not loaded.

Leo: if you're still interested in solving the problem, I can send all the required information to you, either by e-mail or by FAX.

momolinus commented 12 years ago

Hello G-A-N, Hello Leo

yes your are right (again), my patch do not work in non SSL-Proxy. Would you try following:

https://github.com/momolinus/tinymce_compressor/blob/patch-1/tiny_mce_gzip.php line 194 to 200.

With some fast tests it worked on SSL-Proxy and NO-SSL-Proxy.

I'm not complete sure about the meaning of $_SERVER['HTTP_X_FORWARDED_HOST'], so I'm interested on Your comments. Are there some other configurations than SSL-Poxy possible with $_SERVER['HTTP_X_FORWARDED_HOST'] is set?