Forums

[resolved] Browse button replaced by code jumble. Can't upload pics! (4 posts)

  1. michin4
    Member
    Posted 5 years ago #

    Here's my blog:
    http://www.cinemazement.com/blog

    I haven't been able to upload any pictures. I'm on WordPress 2.02. When I go to the "Write Post" section all I get is the following code. The browse button and image viewer rectangle thing is not there. There's just white behind the string of code. I can't upload pictures :(

    addLoadEvent(function () { window.setTimeout('buttonsnap_addbuttons()',1000); }); var buttonsnap_mozilla = document.getElementById&&!document.all; function buttonsnap_safeclick(e) { if(!buttonsnap_mozilla) { e.returnValue = false; e.cancelBubble = true; } } function buttonsnap_addEvent( obj, type, fn ) { if (obj.addEventListener) obj.addEventListener( type, fn, false ); else if (obj.attachEvent) { obj["e"+type+fn] = fn; obj[type+fn] = function() { obj["e"+type+fn]( window.event ); } obj.attachEvent( "on"+type, obj[type+fn] ); } } function buttonsnap_newbutton(src, alt) { if(window.tinyMCE) { var anchor = document.createElement('A'); anchor.setAttribute('href', 'javascript:;'); anchor.setAttribute('title', alt); var newimage = document.createElement('IMG'); newimage.setAttribute('src', src); newimage.setAttribute('alt', alt); newimage.setAttribute('class', 'mceButtonNormal'); buttonsnap_addEvent(newimage, 'mouseover', function() {tinyMCE.switchClass(this,'mceButtonOver');}); buttonsnap_addEvent(newimage, 'mouseout', function() {tinyMCE.switchClass(this,'mceButtonNormal');}); //restoreClass(this) buttonsnap_addEvent(newimage, 'mousedown', function() {tinyMCE.restoreAndSwitchClass(this,'mceButtonDown');}); anchor.appendChild(newimage); brs = mcetoolbar.getElementsByTagName('BR'); if(brs.length > 0) mcetoolbar.insertBefore(anchor, brs[0]); else mcetoolbar.appendChild(anchor); } else if(window.qttoolbar) { var anchor = document.createElement('input'); anchor.type = 'button'; anchor.value = alt; anchor.className = 'ed_button'; anchor.title = alt; anchor.id = 'ed_' + alt; qttoolbar.appendChild(anchor); } return anchor; } function buttonsnap_newseparator() { if(window.tinyMCE) { var sep = document.createElement('IMG'); sep.setAttribute('src', buttonsnap_wproot + '/wp-includes/js/tinymce/themes/advanced/images/spacer.gif'); sep.className = 'mceSeparatorLine'; sep.setAttribute('class', 'mceSeparatorLine'); sep.setAttribute('height', '16'); sep.setAttribute('width', '1'); brs = mcetoolbar.getElementsByTagName('BR'); if(brs.length > 0) mcetoolbar.insertBefore(sep, brs[0]); else mcetoolbar.appendChild(sep); } } function buttonsnap_settext(text) { if(window.tinyMCE) { window.tinyMCE.execInstanceCommand('content', 'mceInsertContent', false, text); tinyMCE.execCommand("mceCleanup"); } else { edInsertContent(edCanvas, text); } } function buttonsnap_ajax(dispatch) { if(window.tinyMCE) { selection = tinyMCE.getInstanceById('content').getSelectedText(); } else { if (document.selection) { document.getElementById('content').focus(); sel = document.selection.createRange(); if (sel.text.length > 0) { selection = sel.text; } else { selection = ''; } } else { selection = ''; } } var ajax = new sack(buttonsnap_request_uri); ajax.setVar('buttonsnapdispatch', dispatch); ajax.setVar('selection', selection); ajax.onCompletion = function () {buttonsnap_settext(this.response);}; ajax.runAJAX(); } var mcetoolbar; var qttoolbar = document.getElementById("ed_toolbar"); function buttonsnap_addbuttons () { if(window.tinyMCE) { try { var edit = document.getElementById(window.tinyMCE.getEditorId('content')); for(table = edit;table.tagName != 'TABLE';table = table.parentNode); mcetoolbar = table.rows[0].firstChild; } catch(e) { setTimeout('buttonsnap_addbuttons()', 5000); return; } } try {

    and help would be greately appreciated :D

  2. michin4
    Member
    Posted 5 years ago #

    I fixed it. It was a plugin that didn't want to cooperate with the rest of my blog. I removed it.

  3. moshu
    Member
    Posted 5 years ago #

    Let us know which one - in case anybody else runs into the same problem. Thanks!

  4. syncbox
    Member
    Posted 5 years ago #

    one plugin that seems to mess with the upload (images in the post screen) is limitcats. With limitcats (for WPv2+) clicking the upload button causes a jumble of code, too, though different code than that given above.
    Oddly, the image is uploaded even though you get errors.
    I've tried to contact owen winkler, but no response.
    And another odd thing is that both admin and other user-levels with write permissions get the error. De-activate limitcats and the errors go away. The errors say:

    -----
    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2]
    INSERT INTO wp_post2cat (post_id, category_id) VALUES (215, )

    Warning: Cannot modify header information - headers already sent by (output started at /home/.servername/xxxxx/wprootfolder/wp-includes/wp-db.php:102) in /home/.servername/xxxxx/wprootfolder/wp-admin/inline-uploading.php on line 101

    I'd really like to keep limitcats... but I am reluctant to tell my client "ignore the stupid error... it's not for real"

    **note that some paths above are replaced with generic example names...

Topic Closed

This topic has been closed to new replies.

About this Topic