Post by - TuGs on Apr 12, 2013 23:29:35 GMT -8
1) The URL to the page you are on when the bug occurred.
www.moreadvancedforum.com
2) What happened, in detail?
Create Thread & Reply button not working... when either of these are pressed the pagination search is blank but has the "Processing Symbol" it also does this immediately after you refresh too
appear then it disappears in 1 second or so...
i recently updated the awards plugin to stop a blank error from "flashing up" (similar to the ajax error people are on about..) accept mine was when you hit a pagination number a blank error box appears... then it redirects fine with the box gone on the new page.
i seem to have traded a bug for a bug here, (i have tried disabling ALL plugins but still does the same)
also i have some custom reply buttons placed differently from default!
ONE OTHER Problem (maybe separate)
my members ranks are acting weird they are not giving my members the ranks i have set properly
instead they have a much higher rank than what i set for there amount of post's?
3) What do you think should have happened instead?
direct to create a thread or reply page(depending on what button is pressed
4) Can you reproduce this on every pageview?
it is intermittent but you can usually get one or the other not work...
5) What browser, version, and operating system are you using?
i know of x2 chrome users and a safari user that have had this problem...
6) Please attach a screen shot (JPG or PNG -- not GIF or BMP) if it is relevant
dont think picture is needed... as the buttons do nothing lol
This is the chrome console error i get on the reply page...
exact url : www.moreadvancedforum.com/thread/286/story?page=Reply
www.moreadvancedforum.com
2) What happened, in detail?
Create Thread & Reply button not working... when either of these are pressed the pagination search is blank but has the "Processing Symbol" it also does this immediately after you refresh too
appear then it disappears in 1 second or so...
i recently updated the awards plugin to stop a blank error from "flashing up" (similar to the ajax error people are on about..) accept mine was when you hit a pagination number a blank error box appears... then it redirects fine with the box gone on the new page.
i seem to have traded a bug for a bug here, (i have tried disabling ALL plugins but still does the same)
also i have some custom reply buttons placed differently from default!
ONE OTHER Problem (maybe separate)
my members ranks are acting weird they are not giving my members the ranks i have set properly
instead they have a much higher rank than what i set for there amount of post's?
3) What do you think should have happened instead?
direct to create a thread or reply page(depending on what button is pressed
4) Can you reproduce this on every pageview?
it is intermittent but you can usually get one or the other not work...
5) What browser, version, and operating system are you using?
i know of x2 chrome users and a safari user that have had this problem...
6) Please attach a screen shot (JPG or PNG -- not GIF or BMP) if it is relevant
dont think picture is needed... as the buttons do nothing lol
This is the chrome console error i get on the reply page...
exact url : www.moreadvancedforum.com/thread/286/story?page=Reply
An error occurred during a document.ready call: TypeError: Cannot call method 'val' of undefined
While executing: function () {
window.wysiwyg_buttons = window.wysiwyg_buttons || {
"underline" : "http://images.proboards.com/v5/images/bbcode/underline.png",
"createLink" : "http://images.proboards.com/v5/images/bbcode/link.png",
"italic" : "http://images.proboards.com/v5/images/bbcode/italic.png",
"justifyFull" : "http://images.proboards.com/v5/images/bbcode/justify-full.png",
"insertHorizontalRule" : "http://images.proboards.com/v5/images/bbcode/horizontal-rule.png",
"insertVideo" : "http://images.proboards.com/v5/images/bbcode/movie.png",
"justifyCenter-active" : "http://images.proboards.com/v5/images/bbcode/justify-center-active.png",
"italic-active" : "http://images.proboards.com/v5/images/bbcode/italic-active.png",
"justifyRight-active" : "http://images.proboards.com/v5/images/bbcode/justify-right-active.png",
"bold-active" : "http://images.proboards.com/v5/images/bbcode/bold-active.png",
"strikethrough" : "http://images.proboards.com/v5/images/bbcode/strikethrough.png",
"justifyLeft" : "http://images.proboards.com/v5/images/bbcode/justify-left.png",
"justifyFull-active" : "http://images.proboards.com/v5/images/bbcode/justify-full-active.png",
"subscript-active" : "http://images.proboards.com/v5/images/bbcode/subscript-active.png",
"underline-active" : "http://images.proboards.com/v5/images/bbcode/underline-active.png",
"createEmail" : "http://images.proboards.com/v5/images/bbcode/email.png",
"foreColor" : "http://images.proboards.com/v5/images/bbcode/color.png",
"insertCode" : "http://images.proboards.com/v5/images/bbcode/code.png",
"insertQuote" : "http://images.proboards.com/v5/images/bbcode/quote.png",
"justifyRight" : "http://images.proboards.com/v5/images/bbcode/justify-right.png",
"insertTable" : "http://images.proboards.com/v5/images/bbcode/table.png",
"bold" : "http://images.proboards.com/v5/images/bbcode/bold.png",
"justifyCenter" : "http://images.proboards.com/v5/images/bbcode/justify-center.png",
"subscript" : "http://images.proboards.com/v5/images/bbcode/subscript.png",
"insertSmiley" : "http://images.proboards.com/v5/images/bbcode/smiley.png",
"strikethrough-active" : "http://images.proboards.com/v5/images/bbcode/strikethrough-active.png",
"superscript" : "http://images.proboards.com/v5/images/bbcode/superscript.png",
"removeFormat" : "http://images.proboards.com/v5/images/bbcode/remove-format.png",
"insertUserLink" : "http://images.proboards.com/v5/images/bbcode/membersearch.png",
"superscript-active" : "http://images.proboards.com/v5/images/bbcode/superscript-active.png",
"insertImage" : "http://images.proboards.com/v5/images/bbcode/image.png",
"justifyLeft-active" : "http://images.proboards.com/v5/images/bbcode/justify-left-active.png",
"insertUnorderedList" : "http://images.proboards.com/v5/images/bbcode/list.png"
}
var wysiwyg_this = document.getElementById(proboards.dataHash.form_id+"_message_input"), isFullReply = !!(wysiwyg_this || proboards.dataHash.css_wysiwyg_style), bbEditor;
if(isFullReply && wysiwyg_this && !$.hasData(wysiwyg_this))return $(window).load(arguments.callee);
wysiwyg_this = wysiwyg_this? $(wysiwyg_this).data('wysiwyg'): $.extend({}, $.ui.wysiwyg.prototype),
plugin_this = proboards.plugin.get('eton_quick_reply_bbbutton'),
//are smiles disabled? If disabled it will return the name of its click handler ("insertSmiley")
nosmiles = (plugin_this.settings.nosmiles || 0)
plugin_this.settings.nosmiles = nosmiles != 0 ? [nosmiles] : []
//build bbcode editor if not already built
if( !(bbEditor = wysiwyg_this.editors.bbcode) ){
bbEditor = wysiwyg_this.editors.bbcode = $.extend({},wysiwyg_this._bbcodeEditor,{built:true});
bbEditor.textarea = bbEditor.editable = bbEditor.bindable = bbEditor.resizable = $('.form_post_quick_reply textarea[name="message"]').get(0);
bbEditor.controls = {
"fontName" : {
"title" : "Font Name"
},
"foreColor" : {
"title" : "Font Color"
},
"fontSize" : {
"title" : "Font Size"
},
"bold" : {
"title" : "Bold",
"tag" : "b"
},
"italic" : {
"title" : "Italic",
"tag" : "i"
},
"underline" : {
"title" : "Underline",
"tag" : "u"
},
"strikethrough" : {
"title" : "Strike Through",
"tag" : "s"
},
"superscript" : {
"title" : "Superscript",
"tag" : "sup"
},
"subscript" : {
"title" : "Subscript",
"tag" : "sub"
},
"removeFormat" : {
"title" : "Remove Formatting"
},
"justifyLeft" : {
"title" : "Justify Left",
"tag" : "div",
"attrs" : {
"align" : "left"
}
},
"justifyCenter" : {
"title" : "Justify Center",
"tag" : "div",
"attrs" : {
"align" : "center"
}
},
"justifyRight" : {
"title" : "Justify Right",
"tag" : "div",
"attrs" : {
"align" : "right"
}
},
"justifyFull" : {
"title" : "Justify Full",
"tag" : "div",
"attrs" : {
"align" : "justify"
}
},
"insertTable" : {
"title" : "Table"
},
"insertUnorderedList" : {
"title" : "List"
},
"insertHorizontalRule" : {
"title" : "Horizontal Rule"
},
"createLink" : {
"title" : "Link"
},
"createEmail" : {
"title" : "Email"
},
"insertImage" : {
"title" : "Insert Image"
},
"insertVideo" : {
"title" : "Insert Video"
},
"insertUserLink" : {
"title" : "Insert User Link"
},
"insertCode" : {
"title" : "Insert Code",
"tag" : "code"
},
"insertQuote" : {
"title" : "Insert Quote",
"tag" : "quote"
},
"insertSmiley" : {
"title" : "Insert Smiley"
}
};
wysiwyg_this.currentEditorName = "bbcode";
$.extend(wysiwyg_this, {
controlsContainer : $('<div class="controls ui-helper-clearfix"></div>').insertBefore(bbEditor.editable).wrap('<div class="ui-wysiwyg" ></div>'),
options : {
defaultEditor : "bbcode",
defaultFormat : "bbocde"
}
});
rebuild = true;
}
$.each(wysiwyg_this.editors, function(editorName,editorData){
var rebuild = false, //flag to indicate whether a rebuilding of the bbcode tray is needed
squatters //holds a jquery collection of bbCode buttons that were added but have not registered themselves with WYSIWYG
if (!nosmiles) {
//create smiles and cheesy grins <img src="http://images.proboards.com/v5/images/smiley/grin.png" alt=" <img src="http://images.proboards.com/v5/images/smiley/grin.png" alt=" <img src="http://images.proboards.com/v5/images/smiley/grin.png" alt=" <img src="http://images.proboards.com/v5/images/smiley/grin.png" alt=" :D" text=":D">" text=":D">" text=":D">" text=":D">
if(!wysiwyg_this.options.smiles){
wysiwyg_this.options.smiles = proboards.shoutbox && proboards.shoutbox.smiles ? proboards.shoutbox.smiles : [":)", "/images/smiley/smiley.png", ":P", "/images/smiley/tongue.png", ":|", "/images/smiley/plain.png", ":'(", "/images/smiley/cry.png", ">:(", "/images/smiley/angry.png", ":D", "/images/smiley/grin.png", ":(", "/images/smiley/sad.png", "::)", "/images/smiley/eyesroll.png", ";)", "/images/smiley/wink.png", "8-)", "/images/smiley/cool.png", ";-|", "/images/smiley/squint.png", "???", "/images/smiley/huh.png", ":o", "/images/smiley/shocked.png", "(rofl)", "/images/smiley/rofl.png", "x_x", "/images/smiley/dead.png", "8D", "/images/smiley/insane.png", "(puke)", "/images/smiley/sick.png", ":))", "/images/smiley/cheesy.png", "O_o", "/images/smiley/browraise.png", ">:D", "/images/smiley/superangry.png", ":-X", "/images/smiley/lipssealed.png", ":-*", "/images/smiley/kiss.png", "8-|", "/images/smiley/nerd.png", "B-|", "/images/smiley/notamused.png", ":-/", "/images/smiley/undecided.png", "(atrb_partsz)", "/images/smiley/asleep.png", ":-[", "/images/smiley/embarrassed.png", ":-S", "/images/smiley/wavey.png", "P-)", "/images/smiley/pirate.png", "(:))", "/images/smiley/ninja.png"]
wysiwyg_this.options.formId = $(wysiwyg_this.controlsContainer).closest('form').attr('id');
wysiwyg_this.options.varName = "message";
if (!$("#" + wysiwyg_this.options.formId + "_message_nosmiles_input").length){
$('<input type="hidden">').attr({
id : wysiwyg_this.options.formId + "_message_nosmiles_input",
disabled : "disabled"
}).appendTo('body');
}
}
}
//remove disabled buttons and selectors
// each settings array will contain the name of the click handler if it has been disabled
$.each(["selectors", "ignore_buttons", "nosmiles"], function (index, value) {
for (var x = (plugin_this.settings[value] || []), y = 0; y < x.length; y++) {
excludes_loop :
for (var a = (isFullReply && $.inArray(editorName, plugin_this.settings.apply_to_full_reply) == -1)?[]:editorData.controlGroups, b = 0, c, d; b < a.length; b++)
for (c = 0; c < a[b].length; c++) {
if ((d = $.inArray(x[y], a[b][c])) > -1) {
a[b][c].splice(d, 1); rebuild = true;
break excludes_loop;
}
}
}
return true;
})
//Add custom buttons
if (plugin_this.settings.custom_buttons.length) {
var groupIndex = editorData.controlGroups[1].length,
group = 1;
for (var custom_buttons = plugin_this.settings.custom_buttons, y = 0, tagID; y < custom_buttons.length; y++) {
var custom_button = custom_buttons[y];
if(custom_button.image.replace)custom_button.image = custom_button.image.replace(/(^|\|)\s+/,"$1").split("|");
if(!/^https?\:\/\//i.test(custom_button.image[0])) continue; //ignore invalid URLS ==no button will show but entering by hand should still work since already added upstairs
//generate a unique id
tagID = (custom_button.tag in editorData.controls) || (custom_button.tag in window.wysiwyg_buttons) ? custom_button.tag + (+new Date) : custom_button.tag;
if(!isFullReply || (isFullReply && $.inArray(editorName, plugin_this.settings.apply_custom_full_reply) > -1)){
//create new entry for button in controls array
editorData.controls[tagID] = {
title : "Insert " + (custom_button.name || custom_button.tag),
tag : custom_button.tag
}
//and add new button image
window.wysiwyg_buttons[tagID] = custom_button.image[0];
if(custom_button.image[1] && custom_button.image[0] != custom_button.image[1] && /^https?\:\/\//i.test(custom_button.image[1])){
window.wysiwyg_buttons[tagID + "-active"] = custom_button.image[1];
}
//add the button to a group
//calculate which group or create new group if value missing or out of bounds
if ($.isNumeric(custom_button.index) && custom_button.index > 0) {
group = custom_button.index <= editorData.controlGroups[0].length ? 0 : 1;
groupIndex = parseInt(custom_button.index) - group * editorData.controlGroups[0].length;
}
if (groupIndex >= editorData.controlGroups[group].length)
groupIndex = editorData.controlGroups[group].push([]);
editorData.controlGroups[group][groupIndex - 1].push(tagID)
//create custom click handler function
var func = editorData.commands[tagID] = function (editor, ui, value) {
function addtag(values) {
editor.surroundSelection(editor.name=="Visual"?$("<"+values.tag+"></"+values.tag+">").attr(values.attrs).get(0):values.tag, $.isEmptyObject(values.attrs) ? false : values.attrs, true)
}
//and add the needed data as expandos
if (custom_button.attributes && custom_button.attributes.length) {
for (var promptATRB = [], atrb = custom_button.attributes.split("|"), xx = 0, control_attrs = editorData.controls[tagID].attrs = {}, atrb_parts; xx < atrb.length; xx++) {
atrb_parts = $.trim(atrb[xx]).split("=");
if (atrb_parts.length == 1)
continue; //no equal sign then ignore
if (atrb_parts[0].toLowerCase().indexOf("style") == 0) {
control_attrs.style = control_attrs.style || "";
//propertyval followed by ":;" will be replaced on prompt
control_attrs.style += atrb_parts[0].split(":")[1] + ":" + atrb_parts[1] + ";";
if (/\:;$/.test(control_attrs.style))
promptATRB.push({
title : atrb_parts[0].split(":")[1] + " style",
name : "css_" + atrb_parts[0].split(":")[1],
input : true,
type : 'text',
size : 20,
required : true
})
} else {
control_attrs[atrb_parts[0]] = atrb_parts[1] || "";
if (control_attrs[atrb_parts[0]] == "")
promptATRB.push({
title : atrb_parts[0],
name : atrb_parts[0],
input : true,
type : 'text',
size : 20,
required : true
})
}
}
if (promptATRB.length){
this._prompt({
title : 'Insert ' + (custom_button.name || custom_button.tag),
fields : promptATRB,
callback : function (values) {
var obj = {
tag : custom_button.tag
},
a;
obj.attrs = $.extend(control_attrs, values)
for (a in obj.attrs) {
if (/^css_/.test(a)) {
obj.attrs.style = obj.attrs.style.replace(a.substr(4) + ":;", a.substr(4) + ":" + obj.attrs[a] + ";");
delete obj.attrs[a];
}
}
addtag(obj)
},
ieWidth : 425
});
}else{
addtag({
tag : custom_button.tag,
attrs : control_attrs
})
}
}
}; rebuild = true;
}
}
}
d=$("."+editorName+"-editor",wysiwyg_this.controlsContainer);
squatters = $('img,a',d).filter(function(){
var a=$(this),c = this.className;
if(a.parents('li.button, .ui-selectMenu').length == 0){
return true; // image/link not added by WYSIWYG
}else if(a.parents('.ui-selectMenu').length){
return false; //ignore menus
}else{
c = a.parents('li.button')[0].className;
}
if(c == "")return true; //no class means squatter with no lease (WYSIWYG knows not of this button!)
if(!/button-(\w+)/.test(c))return true; //no button-clickhandler class also means squatter
c = RegExp.$1; //grab click handler name
return !(c in editorData.controls); //and return boolean based on whether click handler is registered with WYSIWYG
});
if(rebuild){
d = d.css?d.css("display"):"block"; squatters.detach();
$("."+editorName+"-editor",wysiwyg_this.controlsContainer).remove();
wysiwyg_this._buildControls.call(
wysiwyg_this,
editorName,
editorData.controls,
editorData.controlGroups
)
$("."+editorName+"-editor",wysiwyg_this.controlsContainer).css("display",d);
$("."+editorName+"-editor ul",wysiwyg_this.controlsContainer).last().append(squatters);
}
})
//fix mysterious font/size menu clipping by placing at same location smiley menu (unffected) lives.
$('ul.select_menu_list', wysiwyg_this.controlsContainer).appendTo('body');
//fix smiley collision being set to "none"
$('.wysiwyg-smiley-menu').each(function(){$(this).data("menu").options.position.collision = "flip";})
}