ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Very strange JS parse Error in the CP

August 09, 2010 12:56pm

Subscribe [4]
  • #1 / Aug 09, 2010 12:56pm

    Greets,

    This issue is affecting our publish screen in the CP - none of the tabs are working - Category, Date, etc.

    My error console is showing a Parse Error at line 2960 - which is javascript affecting the entry form:

    SP_checkedText = SP_checkedText.replace(/&/g, '&').replace(/, '<').replace(>/g, '>');


    The function is:

    function SP_prepareText()
            {    
                SP_checkedText = SP_checkedText.replace(/&/g, '&').replace(/, '<').replace(>/g, '>');
                
                for (i=0; i < SP_suggested.length; i++)
                {
                    compareString = eval("/(\W*)" + SP_suggested[i] + "(\W*)/g");
                    
                    SP_checkedText = SP_checkedText.replace(compareString,'$1<span class="'+spellClass+'">' + SP_suggested[i] + '$2');
                }
                
                SP_checkedText = SP_checkedText.replace(/(\r\n|\n|\r)/g, '
    ');
            }


    Any idea why this broke? (To know for the future) or how I can fix it now?

    Thanks in advance

  • #2 / Aug 09, 2010 3:13pm

    .replace(/</g, '& l t;')

    is turning into

    .replace(/, ' & lt;')


    We have other installs of EE running on this server that don’t have this issue. Is there any explanation?

  • #3 / Aug 09, 2010 11:05pm

    Brandon Jones

    5500 posts

    .carolinecblaker., it could be add-on related.

    1. Which version and build of EE are you running?
    2. Please try disabling extensions using the green button in the upper-right of the Extension Manager.
    3. If the error still occurs let us know what other add-ons you have running.

  • #4 / Aug 10, 2010 2:07pm

    Hi Brandon,

    Build info: 20100415 EE 1.6.9

    I’ve just disabled all add-ons and still have the issue.

    Running extension add-ons:

    Jquery for the CP
    Geotagger
    Fieldframe
    User
    Meetup API (developed internally to hook into SAEF only)

    Disabling all of the above still left us with the error.

    The weird part is that the code for the spellcheck is correct - its just rendering out without the ‘</g’ - I don’t know what to think.

  • #5 / Aug 10, 2010 3:02pm

    Brandon: is there a way to disable spellcheck in EE? I looked for it but couldn’t find it.

  • #6 / Aug 11, 2010 3:33am

    John Henry Donovan

    12339 posts

    .carolinecblaker.,

    Can you go ahead and upgrade to the most recent build please to rule out anything there.
    Can you also try a different browser to see if issue still persists

    The Shotwell Company,

    In EE 1.x I don’t believe so no. Other than switch off the formatting options for the custom field.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases