Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-16658

Firefly table truncates character field on FmtDisp = "...%s..."

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Won't Fix
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: Firefly
    • Labels:
    • Story Points:
      1
    • Sprint:
      SUIT Sprint 2018-12, SUIT Sprint 2019-01, SUIT Sprint 2019-02, SUIT Sprint 2019-03, SUIT Sprint 2019-04, SUIT Sprint 2019-05, SUIT Sprint 2019-06, SUIT Sprint 2019-07, SUIT Sprint 2019-08, SUIT Sprint 2019-09
    • Team:
      Science User Interface

      Description

      Firefly NED VOtable handing results in a rendered table where the last row returned has datatype="char" arraysize="*" rendered values get truncated when a format is specified.

      E.g.: The value gets truncated if

       

      {{ req.META_INFO["col.External Query URL.FmtDisp"] = "<a TARGET=_nedExternal HREF=\\"%s
      ">   Link ↗</a>";}}

      URL send to Firefly for table data:

      http://ned.ipac.caltech.edu/cgi-bin/objsearch?extend=no&out_csys=Equatorial&out_equinox=J2000.0&obj_sort=RA+or+Longitude&of=xml_extern&zv_breaker=30000.0&list_limit=5&img_stamp=NO&objname=n+4151&hconst=67.8&omegam=0.308&omegav=0.692 

      From the query response:

      <FIELD ID="ext_col3" name="External Query URL" ucd="request.url" datatype="char" type="hidden" arraysize="*"><DESCRIPTION> NED's link to related on-line astronomical services that are specific to the survey or catalog associated with the NED names.</DESCRIPTION></FIELD>

      The final record has an example that gets truncated to 200 characters:

      <TD>http://archive.nrao.edu/archive/ArchiveQuery?SUBMIT=Submit+Query&PASSWD=&QUERYTYPE=ARCHIVE&PROTOCOL=HTML&SORT_PARM=Starttime&SORT_ORDER=Asc&MAX_ROWS=NO+LIMIT&SORT_PARM2=Starttime&SORT_ORDER2=Asc&QUERY_ID=9999&QUERY_MODE=Prepare+Download&LOCKMODE=PROJECT&SITE_CODE=AOC&DBHOST=CHEWBACCA&WRITELOG=0&PROJECT_CODE=&SEGMENT=&OBSERVER=&ARCHIVE_VOLUME=&TIMERANGE1=&TIMERANGE2=&SOURCE_ID=&SRC_SEARCH_TYPE=NED+or+SIMBAD+Resolver&CALIB_TYPE=ALL+Srcs&CENTER_RA=12h10m32.6s&LONG_RANGE=&FRAME=Equatorial&CENTER_DEC=+39d24'21"&LAT_RANGE=&EQUINOX=J2000&SRAD=1&MIN_EXPOSURE=&OBS_BANDS=ALL&TELESCOPE=ALL&OBS_MODE=ALL&CORR_MODE=ALL&TELESCOPE_COFIG=ALL&OBS_POLAR=ALL&SUBARRAY=ALL&OBSFREQ1=&DATATYPE=ALL&OBSBW1=&ARCHFORMAT=ALL</TD>

      truncated to in rendered table:  

      http://archive.nrao.edu/archive/ArchiveQuery?SUBMIT=Submit+Query&PASSWD=&QUERYTYPE=ARCHIVE&PROTOCOL=HTML&SORT_PARM=Starttime&SORT_ORDER=Asc&MAX_ROWS=NO+LIMIT&SORT_PARM2=Starttime&SORT_ORDER2=Asc&QUERY_ID=9999&QUERY_MODE=Prepare+Download&LOCKMODE=PROJECT&SITE_CODE=AOC&DBHOST=CHEWBACCA&WRITELOG=0&PROJECT_CODE=&SEGMENT=&OBSERVER=&ARCHIVE_VOLUME=&TIMERANGE1=&TIMERANGE2=&SOURCE_ID=&SRC_SEARCH_TYPE=NED+or+SIMBAD+Resolver&CALIB_TYPE=ALL+Srcs&CENTER_RA=12h10m32.6s&LONG_RANGE=&FRAME=Equatorial&CENTER_DEC=+39d24%2721
       

        Attachments

          Issue Links

            Activity

            Hide
            loi Loi Ly added a comment -

            This looks like a data problem.  The example above contains unencoded quote and double-quotes in the URL.  Combined with the `FmtDisp` value, you get an href that looks like this:

            HREF="http://archive.nrao.edu/archive/ArchiveQuery?.......&CENTER_DEC=+39d24'21"... the-rest-of-the-string"

            The browser will take the value between the double-quotes and make a link out of it.  This is why you think the string is truncated.  If you save the file or switch to text view, you will see that the value is not truncated.

            Jeffery Jacobson, I think the quotes in the url should be encoded with %22 and %27.

            Show
            loi Loi Ly added a comment - This looks like a data problem.  The example above contains unencoded quote and double-quotes in the URL.  Combined with the `FmtDisp` value, you get an href that looks like this: HREF="http://archive.nrao.edu/archive/ArchiveQuery?.......&CENTER_DEC=+39d24'21"... the-rest-of-the-string" The browser will take the value between the double-quotes and make a link out of it.  This is why you think the string is truncated.  If you save the file or switch to text view, you will see that the value is not truncated. Jeffery Jacobson , I think the quotes in the url should be encoded with %22 and %27.
            Hide
            jdj Jeffery Jacobson added a comment -

            Loi Ly, I see what you're saying about the quotes.

            Show
            jdj Jeffery Jacobson added a comment - Loi Ly , I see what you're saying about the quotes.
            Hide
            jdj Jeffery Jacobson added a comment -

            Thanks Loi Ly

            I see that no truncation is taking place.   Using a FmtDisp to construct a href="<ref>" is not appropriate.   The NED table of external links can use another mechanism: getFromURL(url) javascript using the same pattern as NED is already using for references and object links.  Looks like this can be closed.

            Show
            jdj Jeffery Jacobson added a comment - Thanks Loi Ly I see that no truncation is taking place.   Using a FmtDisp to construct a href="<ref>" is not appropriate.   The NED table of external links can use another mechanism: getFromURL(url) javascript using the same pattern as NED is already using for references and object links.  Looks like this can be closed.
            Hide
            loi Loi Ly added a comment -

            No code changes will be made.  This is a data problem.

            Show
            loi Loi Ly added a comment - No code changes will be made.  This is a data problem.

              People

              Assignee:
              loi Loi Ly
              Reporter:
              jdj Jeffery Jacobson
              Watchers:
              Emmanuel Joliet, Jeffery Jacobson, Loi Ly, Rick Ebert, Xiuqin Wu [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Jenkins

                  No builds found.