Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Dan Kinchen

    (@igotdreams)

    you need jquery to run my particular code. So in my footer after the jquery call. But this only pertains to my theme, yours may be different.

    Thread Starter Dan Kinchen

    (@igotdreams)

    In the meantime I am fixing it like so:

    <script>
    $(window).load(function({
       $("#wpstats").attr("width","6").attr('height','5');
    });
    </script>
    Dan Kinchen

    (@igotdreams)

    This was my problem. Fixed it for me!

    I had this same problem for days now, I finally got it resolved today. My problem was that my server is processing javascript files through php. Further some of the programmers in my company are using php shortcodes <? rather than <?php. So what is happening is that the php server is throwing errors on the tinymce.js file. The error I get in javascript console is;

    Uncaught SyntaxError: Unexpected identifier tiny_mce.js:2
    Uncaught ReferenceError: tinymce is not defined wp-tinymce-schema.js:940
    Uncaught ReferenceError: tinyMCE is not defined wp-langs-en.js:1
    Uncaught ReferenceError: tinymce is not defined post.php?post=34&action=edit:1575

    If you attempt to directly access this file on my server;

    /wp-includes/js/tinymce/tiny_mce.js

    I get

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /domain.com/wp-includes/js/tinymce/tiny_mce.js on line 1

    Because this javascript is minified and is all on line 1. So I expanded the code and ran it again and found this piece of code giving me the problem.

    if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}

    So because my server is set to use php to parse the javascript files (there is a reason why they want it) and we are using php shortcodes, this is why tinymce.js is failing.

    Here are 2 solutions for you.

    1. make sure php short codes are off. short_open_tag=Off in your php.ini file
    2. set apache to only process php files with php

    BUT

    I could not do either of these, my solution was this.

    • open /wp-includes/js/tinymce/tiny_mce.js
    • find if(i){c.push("<?",h," ",i,"?>")}else{c.push("<?",h,"?>")}
    • delete it
    • refresh post page… fixed, kinda
    • I noticed a second row of tags missing when I compared to another wordpress install I have on another server
    • so I got & installed this plugin Ultimate Tinymce
    • fixed!

    Here is a list of things that worked for other people.

    Clear Cache Solution

    • deactivate plugs
    • switch to default theme
    • clear cache
    • Loaded page back up with it working
    • then turned back on theme and plugins

    Use Google Libraries Plugin Solution

    Turned off visual editor workaround

    • Go to users tab in admin
    • Select your profile
    • under visual editor setting
    • Check the box Disable the visual editor when writing
    • click update profile

    Alter wp-config.php file

    • add define('CONCATENATE_SCRIPTS', false); to wp-congig.php
Viewing 4 replies - 1 through 4 (of 4 total)