Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-7588

naturalSort.js is provided as coffeescript instead of plain javascript

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.2, 6.0
    • Fix Version/s: 5.2.1, 5.3, 6.0
    • Component/s: Admin UI
    • Labels:
      None
    • Environment:

      Fedora 21

      openjdk version "1.8.0_45"
      OpenJDK Runtime Environment (build 1.8.0_45-b14)
      OpenJDK 64-Bit Server VM (build 25.45-b02, mixed mode)

      Description

      The Dataimport tab of a core will hang with a loading screen or display the previously accessed tab instead of showing the expected dataimport screen.

      The console in Chrome has the following error log, but it's obvious to me that it's trying to run un-transpiled coffeescript:

      naturalSort.js?_=6.0.0:30 Uncaught SyntaxError: Unexpected token ILLEGAL
      jquery.sammy.js?_=6.0.0:120 [Fri May 22 2015 23:36:59 GMT-0700 (MST)] runRoute get #/db/dataimport
      dataimport.js?_=6.0.0:48 Uncaught ReferenceError: naturalSort is not defined
      

      The file in question can be viewed here: https://svn.apache.org/viewvc/lucene/dev/trunk/solr/webapp/web/js/lib/naturalSort.js?view=markup

      I was able to verify this in my own build as well as the nightly builds hosted on the Apache Jenkins server with the default DIH example (bin/solr start -e dih).

      After replacing the coffeescript file with one transpiled to javascript (available at https://github.com/jarinudom/naturalSort.js/blob/master/dist/naturalSort.js), the dataimport tab worked as expected.

      1. SOLR-7588.patch
        5 kB
        Bill Bell
      2. SOLR-7588.patch
        6 kB
        Shawn Heisey

        Issue Links

          Activity

          Hide
          elyograg Shawn Heisey added a comment -

          Checked out the 5.2 branch, built the server, and ran it with the solr home set to the example-DIH/solr directory. The dataimport page in the admin UI worked, and I confirmed with Firebug that it was loading naturalSort.js.

          Show
          elyograg Shawn Heisey added a comment - Checked out the 5.2 branch, built the server, and ran it with the solr home set to the example-DIH/solr directory. The dataimport page in the admin UI worked, and I confirmed with Firebug that it was loading naturalSort.js.
          Hide
          elyograg Shawn Heisey added a comment -

          Committed change passes precommit, but before I declare this done, I'm going to make SURE it's really fixed this time.

          Show
          elyograg Shawn Heisey added a comment - Committed change passes precommit, but before I declare this done, I'm going to make SURE it's really fixed this time.
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1684236 from Shawn Heisey in branch 'dev/branches/lucene_solr_5_2'
          [ https://svn.apache.org/r1684236 ]

          SOLR-7588: Fix javascript bug introduced by SOLR-7409 that broke dataimport in admin UI. (merge trunk r1684234)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1684236 from Shawn Heisey in branch 'dev/branches/lucene_solr_5_2' [ https://svn.apache.org/r1684236 ] SOLR-7588 : Fix javascript bug introduced by SOLR-7409 that broke dataimport in admin UI. (merge trunk r1684234)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1684235 from Shawn Heisey in branch 'dev/branches/branch_5x'
          [ https://svn.apache.org/r1684235 ]

          SOLR-7588: Fix javascript bug introduced by SOLR-7409 that broke dataimport in admin UI. (merge trunk r1684234)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1684235 from Shawn Heisey in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1684235 ] SOLR-7588 : Fix javascript bug introduced by SOLR-7409 that broke dataimport in admin UI. (merge trunk r1684234)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1684234 from Shawn Heisey in branch 'dev/trunk'
          [ https://svn.apache.org/r1684234 ]

          SOLR-7588: Fix javascript bug introduced by SOLR-7409 that broke dataimport in admin UI.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1684234 from Shawn Heisey in branch 'dev/trunk' [ https://svn.apache.org/r1684234 ] SOLR-7588 : Fix javascript bug introduced by SOLR-7409 that broke dataimport in admin UI.
          Hide
          elyograg Shawn Heisey added a comment -

          Proposed patch against trunk. CHANGES.txt includes a new 5.2.1 section with this as the lone issue fixed.

          Show
          elyograg Shawn Heisey added a comment - Proposed patch against trunk. CHANGES.txt includes a new 5.2.1 section with this as the lone issue fixed.
          Hide
          elyograg Shawn Heisey added a comment -

          With the addition of a license header, patch passes precommit.

          I'm going to need an entry in CHANGES.txt ... this is a bad enough screwup that we probably need a 5.2.1 release, so that's what I will plan on.

          Show
          elyograg Shawn Heisey added a comment - With the addition of a license header, patch passes precommit. I'm going to need an entry in CHANGES.txt ... this is a bad enough screwup that we probably need a 5.2.1 release, so that's what I will plan on.
          Hide
          elyograg Shawn Heisey added a comment -

          Looking over the other issue notes, this is probably 100 percent my fault, working with stuff I didn't really understand.

          Show
          elyograg Shawn Heisey added a comment - Looking over the other issue notes, this is probably 100 percent my fault, working with stuff I didn't really understand.
          Hide
          elyograg Shawn Heisey added a comment -

          I know nothing about coffeescript. I'm curious how this could have worked for the user who provided the patch on SOLR-7409.

          Show
          elyograg Shawn Heisey added a comment - I know nothing about coffeescript. I'm curious how this could have worked for the user who provided the patch on SOLR-7409 .
          Hide
          elyograg Shawn Heisey added a comment -

          Looks like this one is my fault - SOLR-7409.

          Thanks for the patch, I will get it committed as soon as I can.

          Show
          elyograg Shawn Heisey added a comment - Looks like this one is my fault - SOLR-7409 . Thanks for the patch, I will get it committed as soon as I can.
          Hide
          billnbell Bill Bell added a comment -

          Patch for naturalSort.js for 5.2

          Show
          billnbell Bill Bell added a comment - Patch for naturalSort.js for 5.2

            People

            • Assignee:
              elyograg Shawn Heisey
              Reporter:
              dwo Derek Wood
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development