Wicket
  1. Wicket
  2. WICKET-1520

JavaScriptStripper breaks prototype.js

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.3.2, 1.3.3
    • Fix Version/s: 1.3.5
    • Component/s: None
    • Labels:
      None

      Description

      JavaScriptStripper is used to strip whitespace and comments from JavaScript files if the resource settings for the application enable that behavior.

      The problem is it breaks prototype.js version 1.6.0 (a heavily used JavaScript library, used by many components like wicketstuff-scriptaculous ).
      It changes the library so that the line that reads:

      document.write("<script id=__onDOMContentLoaded defer src=//:><\/script>");

      becomes:

      document.write("<script id=__onDOMContentLoaded defer src=

      This is enough to render useless any application that relies on scriptaculous . The funny part is that it only happen if the application mode is DEPLOYMENT, as in DEVELOPMENT this code is not active.

      I suggest dropping this functionality altogether - the logic for doing the stripping is extremely complicated and what is the point of stripping whitespace and comments from something that is going to be gzip compressed anyway?

        Issue Links

          Activity

          Matej Knopp made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Hide
          Marat Radchenko added a comment -

          Bug doesn't appear in wicket-1.4-m3

          Show
          Marat Radchenko added a comment - Bug doesn't appear in wicket-1.4-m3
          Hide
          Matej Knopp added a comment -

          With what version? Have you tested latest branch/trunk?

          Show
          Matej Knopp added a comment - With what version? Have you tested latest branch/trunk?
          Hide
          Carlo M. Camerino added a comment -

          Also getting problems with jquery.

          Show
          Carlo M. Camerino added a comment - Also getting problems with jquery.
          Martijn Dashorst made changes -
          Fix Version/s 1.3.4 [ 12313089 ]
          Fix Version/s 1.3.5 [ 12313175 ]
          Hide
          Matej Knopp added a comment -

          This should be already fixed. Can you try latest trunk?

          Show
          Matej Knopp added a comment - This should be already fixed. Can you try latest trunk?
          Hide
          Marat Radchenko added a comment -

          Also affects wicket-1.4-m1

          Show
          Marat Radchenko added a comment - Also affects wicket-1.4-m1
          Igor Vaynberg made changes -
          Assignee Matej Knopp [ knopp ]
          Hide
          Igor Vaynberg added a comment -

          i think this was already fixed?

          Show
          Igor Vaynberg added a comment - i think this was already fixed?
          Hide
          Marat Radchenko added a comment -

          Get the same error here.

          Show
          Marat Radchenko added a comment - Get the same error here.
          Roy van Rijn made changes -
          Field Original Value New Value
          Link This issue is related to WICKET-918 [ WICKET-918 ]
          Juliano Viana created issue -

            People

            • Assignee:
              Matej Knopp
              Reporter:
              Juliano Viana
            • Votes:
              4 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development