Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: "Regular expression too complex" when using Mozilla Firefox 4

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User wasp's Avatar
    Join Date
    Nov 2007
    Posts
    29

    Exclamation "Regular expression too complex" when using Mozilla Firefox 4

    Hi,

    we have a very complex system, built on ExtJS 3.x. Since Firefox 4, in a lot places we get this error.

    The error occurs on line 6711 of ext-all-debug.js ( in ExtJS 3.3.1 )

    the row is as follows:

    Code:
    dom.innerHTML = html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, "");
    The thing is, because the JS code is too large, the "regular expression too complex" occurs. I cannot lower the size of the JS code, because it's just not possible at this stage.

    Is there a solution for this problem? Anyone encountered this?

  2. #2
    Sencha User
    Join Date
    May 2009
    Posts
    30

    Default

    I've got the same problem with my ERP... That's a huge problem...

  3. #3
    Sencha User
    Join Date
    Feb 2010
    Posts
    1

    Default

    many people have same problem. but i guess the issue is on firefox. i guess FF limited the ready to render dom max value to make faster browsing. lots of people had the same issue.. even a few lines of ext.store codes contain more than 1500 records can create such error. https://support.mozilla.com/en-US/questions/797123 but i hope there's answer to this question soon from expert.

  4. #4
    Ext JS Premium Member prophet's Avatar
    Join Date
    Mar 2007
    Location
    Greenwich, CT
    Posts
    189

    Default

    Same issue here. Bump!

  5. #5

    Question Same problem here

    Only since Firefox 4. I'm on ExtJS 3.2. The error occurs while executing my email validation regex:

    Ext.apply(Ext.form.VTypes, {

    // Override the default Ext function, to allow valid but oddly-placed hyphens
    'email': function(v) {
    var email = /^([\w\-]+)([\.\w\-\+]+)*@([\w\-]+\.){1,5}([A-Za-z]){2,4}$/;
    return email.test(v);
    }
    });

  6. #6
    Ext JS Premium Member prophet's Avatar
    Join Date
    Mar 2007
    Location
    Greenwich, CT
    Posts
    189

    Smile

    I actually narrowed my issue down to a bunch of Ext.ToolTips being registered with long data (HTML Tables) in the html config property.

    I removed the html config, and used autoLoad (remote loading) for the content rather than putting it inline, and voila! No more error!

  7. #7
    Sencha User
    Join Date
    Nov 2010
    Posts
    1

    Default a proposal of workaround ?

    Hi,
    the problem seems solved by changing from :
    dom.innerHTML = html.replace(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, "");
    to :
    dom.innerHTML = html.replace(/<script.*?>((\n|\r|.)*?)<\/script>/ig, "");
    The same operation should also be done in some other locations.
    Do you think that this workaround can generate board effects ? which one ?
    Last edited by clecuret; 30 May 2011 at 11:49 PM. Reason: a workaround ?

  8. #8

    Default

    Is there any development for this issue? We have the same problem and the application isnt rendered at all!
    Huge problem here...

    The problem is only detected on the new Firefox 4.

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Posts
    448

    Default

    I tried clecuret's fix, removing the non-capturing groups in the regular expressions that look for "script" tags. It seems to work, and I can't find any obvious reason why the non-capturing groups would be necessary. Any thoughts from the Ext team?

  10. #10
    Sencha User
    Join Date
    May 2009
    Posts
    30

    Default

    I found a solution by compressing my code.

    But, it's not a real solution, I think it's more a firefox bug than an EXTJs bug.

Page 1 of 2 12 LastLast

Similar Threads

  1. Grid/XML problem - "unterminated regular expression lit
    By Saeven in forum Ext 1.x: Help & Discussion
    Replies: 13
    Last Post: 10 Nov 2010, 2:58 AM
  2. [FIXED-93] "Line 32" expression "this.el" ext-complete.js
    By Shane F in forum Ext Designer: Bugs
    Replies: 12
    Last Post: 7 Apr 2010, 9:29 AM
  3. Help needed for writing regular expression for this complex conditions
    By atuldige in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 14 Nov 2009, 2:15 AM
  4. BorderLayout on a div inside a "regular" page
    By digeomel in forum Ext 1.x: Help & Discussion
    Replies: 6
    Last Post: 28 Feb 2007, 6:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •