By Wim on Tuesday, 17 January 2017
Posted in General
Replies 6
Likes 0
Views 269
Votes 0
I'm trying to edit an email template using Emails > Template Editor.

The problem is the Email Editor stays blank when editing email template.
A screenshot for clearification.
Wim
·
Tuesday, 17 January 2017 21:17
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Wim,

I've tried to replicate this issue locally, seems I cannot replicate this
Perhaps is it possible for you to provide us with the back end and FTP access to your site to check on this issue?

You can add the information needed by edit your first post in the Details section or you can just include your site's access once at http://stackideas.com/dashboard/site rather than needing to keep adding them in your replies
·
Wednesday, 18 January 2017 11:10
·
0 Likes
·
0 Votes
·
0 Comments
·
I thought I'd pick this one up again. There is a JS error on most of Komento's administrator pages:

script.min.js?v=17.7.17782:formatted:258 Uncaught ReferenceError: jQuery is not defined
at script.min.js?v=17.7.17782



/*
* Copyright © 2017 Regular Labs - All Rights Reserved
* License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
*/
var RegularLabsScripts = null;
(function($) {
$(document).ready(function() {
$("div.control-group > div").each(function(i, el) {
if ($(el).html().trim() == "" && ($(el).attr("class") == "control-label" || $(el).attr("class") == "controls"))
$(el).remove()
});
$("div.control-group").each(function(i, el) {
if ($(el).html().trim() == "")
$(el).remove()
});
$("div.control-group > div.hide").each(function(i, el) {
$(el).parent().css("margin", 0)
});
$(".rl_resize_textarea").click(function() {
var $el = $(this);
var $field = $("#" + $el.attr("data-id"));
if ($el.hasClass("rl_minimize")) {
$el.removeClass("rl_minimize").addClass("rl_maximize");
$field.css({
"height": $el.attr("data-min")
});
return
}
$el.removeClass("rl_maximize").addClass("rl_minimize");
$field.css({
"height": $el.attr("data-max")
})
})
});
RegularLabsScripts = {
loadajax: function(url, succes, fail, query, timeout, dataType, cache) {
if (url.substr(0, 9) != "index.php") {
url = url.replace("http://", "");
url = "index.php?rl_qp=1&url=" + encodeURIComponent(url);
if (timeout)
url += "&timeout=" + timeout;
if (cache)
url += "&cache=" + cache
}
var dt = dataType ? dataType : "";
$.ajax({
type: "post",
url: url,
dataType: dt,
success: function(data) {
if (succes)
eval(succes + ";")
},
error: function(data) {
if (fail)
eval(fail + ";")
}
})
},
displayVersion: function(data, extension, version) {
if (!data)
return;
var xml = RegularLabsScripts.getObjectFromXML(data);
if (!xml)
return;
if (typeof xml[extension] === "undefined")
return;
var dat = xml[extension];
if (!dat || typeof dat["version"] === "undefined" || !dat["version"])
return;
var new_version = dat["version"];
var compare = RegularLabsScripts.compareVersions(version, new_version);
if (compare != "<")
return;
var el = $("#nonumber_newversionnumber_" + extension);
if (el)
el.text(new_version);
el = $("#nonumber_version_" + extension);
if (el) {
el.css("display", "block");
el.parent().removeClass("hide")
}
},
toggleSelectListSelection: function(id) {
var el = document.getElement("#" + id);
if (el && el.options)
for (var i = 0; i < el.options.length; i++)
if (!el.options[i].disabled)
el.options[i].selected = !el.options[i].selected
},
toggleSelectListSize: function(id) {
var link = document.getElement("#toggle_" + id);
var el = document.getElement("#" + id);
if (link && el) {
if (!el.getAttribute("rel"))
el.setAttribute("rel", el.getAttribute("size"));
if (el.getAttribute("size") == el.getAttribute("rel")) {
el.setAttribute("size", el.length > 100 ? 100 : el.length);
link.getElement("span.show").setStyle("display", "none");
link.getElement("span.hide").setStyle("display", "inline");
if (typeof RegularLabsToggler !== "undefined")
RegularLabsToggler.autoHeightDivs()
} else {
el.setAttribute("size", el.getAttribute("rel"));
link.getElement("span.hide").setStyle("display", "none");
link.getElement("span.show").setStyle("display", "inline")
}
}
},
prependTextarea: function(id, content, separator) {
var textarea = jQuery("#" + id);
var orig_content = textarea.val().trim();
if (orig_content && separator)
orig_content = "\n\n" + separator + "\n\n" + orig_content;
textarea.val(content + orig_content)
},
in_array: function(needle, haystack, casesensitive) {
if ({}.toString.call(needle).slice(8, -1) != "Array")
needle = [needle];
if ({}.toString.call(haystack).slice(8, -1) != "Array")
haystack = [haystack];
for (var h = 0; h < haystack.length; h++)
for (var n = 0; n < needle.length; n++)
if (casesensitive) {
if (haystack[h] == needle[n])
return true
} else if (haystack[h].toLowerCase() == needle[n].toLowerCase())
return true;
return false
},
getObjectFromXML: function(xml) {
if (!xml)
return;
var obj = [];
$(xml).find("extension").each(function() {
var el = [];
$(this).children().each(function() {
el[this.nodeName.toLowerCase()] = String($(this).text()).trim()
});
if (typeof el.alias !== "undefined")
obj[el.alias] = el;
if (typeof el.extname !== "undefined" && el.extname != el.alias)
obj[el.extname] = el
});
return obj
},
compareVersions: function(num1, num2) {
num1 = num1.split(".");
num2 = num2.split(".");
var let1 = "";
var let2 = "";
var max = Math.max(num1.length, num2.length);
for (var i = 0; i < max; i++) {
if (typeof num1[i] === "undefined")
num1[i] = "0";
if (typeof num2[i] === "undefined")
num2[i] = "0";
let1 = num1[i].replace(/^[0-9]*(.*)/, "$1");
num1[i] = parseInt(num1[i]);
let2 = num2[i].replace(/^[0-9]*(.*)/, "$1");
num2[i] = parseInt(num2[i]);
if (num1[i] < num2[i])
return "<";
else if (num1[i] > num2[i])
return ">"
}
if (let2 && (!let1 || let1 > let2))
return ">";
else if (let1 && (!let2 || let1 < let2))
return "<";
else
return "="
},
setRadio: function(id, value) {
value = value ? 1 : 0;
document.getElements("input#jform_" + id + value + ",input#jform_params_" + id + value + ",input#advancedparams_" + id + value).each(function(el) {
el.click()
})
},
setToggleTitleClass: function(input, value) {
var el = $(input);
el = el.parent().parent().parent().parent();
el.removeClass("alert-success").removeClass("alert-error");
if (value === 2)
el.addClass("alert-error");
else if (value)
el.addClass("alert-success")
},
initCheckAlls: function(id, classname) {
$("#" + id).attr("checked", RegularLabsScripts.allChecked(classname));
$("input." + classname).click(function() {
$("#" + id).attr("checked", RegularLabsScripts.allChecked(classname))
})
},
allChecked: function(classname) {
return $("input." + classname + ":checkbox:not(:checked)").length < 1
},
checkAll: function(checkbox, classname) {
var allchecked = RegularLabsScripts.allChecked(classname);
$(checkbox).attr("checked", !allchecked);
$("input." + classname).attr("checked", !allchecked)
},
getEditorSelection: function(editorname) {
var editor_textarea = document.getElementById(editorname);
if (!editor_textarea)
return "";
var iframes = editor_textarea.parentNode.getElementsByTagName("iframe");
if (!iframes.length)
return "";
var editor_frame = iframes[0];
var contentWindow = editor_frame.contentWindow;
if (typeof contentWindow.getSelection !== "undefined") {
var sel = contentWindow.getSelection();
if (sel.rangeCount) {
var container = contentWindow.document.createElement("div");
var len = sel.rangeCount;
for (var i = 0; i < len; ++i)
container.appendChild(sel.getRangeAt(i).cloneContents());
return container.innerHTML
}
return ""
}
if (typeof contentWindow.document.selection !== "undefined") {
if (contentWindow.document.selection.type == "Text")
return contentWindow.document.selection.createRange().htmlText;
return ""
}
return ""
}
};
$(document).ready().delay(1E3, function() {
$(".btn-group.rl_btn-group label").click(function() {
var label = $(this);
var input = $("#" + label.attr("for"));
label.closest(".btn-group").find("label").removeClass("active btn-success btn-danger btn-primary");
if (input.val() == "" || input.val() == -2)
label.addClass("active btn-primary");
else if (input.val() == -1)
label.addClass("active");
else if (input.val() == 0)
label.addClass("active btn-danger");
else
label.addClass("active btn-success");
input.prop("checked", true)
});
$(".btn-group.rl_btn-group input[checked=checked]").each(function() {
$("label[for=" + $(this).attr("id") + "]").removeClass("active btn-success btn-danger btn-primary");
if ($(this).val() == "" || $(this).val() == -2)
$("label[for=" + $(this).attr("id") + "]").addClass("active btn-primary");
else if ($(this).val() == -1)
$("label[for=" + $(this).attr("id") + "]").addClass("active");
else if ($(this).val() == 0)
$("label[for=" + $(this).attr("id") + "]").addClass("active btn-danger");
else
$("label[for=" + $(this).attr("id") + "]").addClass("active btn-success")
})
})
})(jQuery);


I've also created a ticket at Regular Labs:
https://www.regularlabs.com/forum/articlesanywhere/44413-jquery-conflict-in-administrator-komento#73665
Wim
·
Tuesday, 25 July 2017 16:50
·
0 Likes
·
0 Votes
·
0 Comments
·
The JS error has been solved by Regular Labs.

Still, there is no email editor showing up. What kind of access do you need to troubleshoot this?

I can not give FTP access bu I can give you temporaty Administrator access.

Wim
Wim
·
Tuesday, 25 July 2017 17:30
·
0 Likes
·
0 Votes
·
0 Comments
·
Hi Wim,

As you cannot give us the FTP access, you can edit the first post in the Details section to add the information needed to check on this issue?

Thanks for your understanding Wim
·
Tuesday, 25 July 2017 17:44
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post