From ffe581225caac600d6589ea2181ec1697e7a7db1 Mon Sep 17 00:00:00 2001 From: Ian Date: Sun, 15 Mar 2015 11:23:23 +0100 Subject: [PATCH] fix strange PHP parse error on subdomain usage preventing ckeditor to load the resource and itself. console errors like: ckeditor.js:77 GET http://sub.domain.org/htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js?t=F0RD ckeditor.js:226 Uncaught [CKEDITOR.resourceManager.load] Resource name "procurator" was not found at "http://sub.domain.org/htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js?t=F0RD". server error.log like: [Sun Mar 15 10:34:32 2015] [error] [client 1.2.3.4] PHP Parse error: syntax error, unexpected '{' in /var/www/domain.org/html/sub/htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js on line 129, referer: http://sub.domain.org/serendipity_admin.php?serendipity[adminModule]=entries&serendipity[adminAction]=new Why does PHP read/parse js files? Why does it not respect // notes, nor /* notes */ in this case? Might that be because Chrome says to all available loading js resources in Serendipity "Resource interpreted as Script but transferred with MIME type text/html" ??? --- htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js b/htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js index d9f4d4f2..dd3e8186 100644 --- a/htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js +++ b/htmlarea/ckeditor/ckeditor/plugins/procurator/plugin.js @@ -3,7 +3,7 @@ */ /** - * @fileOverview A Serendipity wysiwyg-mode-placeholder plugin: procurator, v. 1.4 + * @fileOverview A Serendipity wysiwyg-mode-placeholder plugin: procurator, v. 1.5, 2015-03-15 */ (function (pluginName) { @@ -126,7 +126,7 @@ // this is case {cke_protected} data if ( elString.substr( 0, protectedSourceMarker.length ) == protectedSourceMarker ) { var realData = elString.replace(/\{cke_protected\}([\s\S]+?)/g, "$1"); // cuts the snippet from {cke_protected}(.*) to preserve - // <