Loading ...
Sorry, an error occurred while loading the content.
 

Re: [ydn-javascript] Bug in DataTable?

Expand Messages
  • Christian Tiberg
    Well, that might be, but it happens for every datatable without rows in our project, and only in IE. I ll have to do something about it here, but don t feel
    Message 1 of 15 , Nov 3, 2008
      Well, that might be, but it happens for every datatable without rows in our project, and only in IE. I'll have to do something about it here, but don't feel comfortable editing YUI code... Putting "if (elTbody.rows.length > 0) " in front of the offending line fixes it, but that'd require us to do this fix for every future release :(

      Best regards,
       Christian Tiberg


      2008/11/3 Satyam <satyam@...>

      IE certainly knows where the error has cascaded to, the point where it
      can go no further, but the underlying cause might be another. The line
      it points to is executed asynchronously, just like the DataTable can
      render table rows in asynchronous batches so it can delete them. Might
      something else be happening elsewhere that's pulling the rug from under
      this method's feet? The code sets up a batch to delete N number of
      lines each time. What would happen if there are not N lines by the time
      it executes? Different performance amongst JavaScript engines in
      different browsers might account for why it happens in IE and not in
      others.

      Satyam



      Christian Tiberg wrote:
      > That's strange.. Explorer points to the line
      > saying elTbody.deleteRow(-1), or rather the next, as Explorer always
      > does. So you're saying that Explorer doesn't know which line is
      > causing the error?
      >
      > Best regards,
      > Christian Tiberg
      >
      >
      > 2008/11/3 Satyam <satyam@... <mailto:satyam@...>>

      >
      > The purpose of that loop is, indeed, to empty the table,
      > nevertheless,
      > it has nothing to do with the Loading .... message remaining visible.
      > The table body and the body used for messages are independently
      > visible
      > not mutually exclusive or something like that. This method makes the
      > table body, the one used for records display, invisible so the
      > browser
      > won't trouble itself redrawing the table with each and every row
      > delete,
      > then it makes it visible again, not because there would be any
      > records
      > to show but just to return the visibility to a known default state.
      > Nothing of this would affect the Loading ... message since turning
      > one
      > tbody off does not make any other visible. So, if you are left with a
      > Loading .... message displayed, you might still have a bug, but it is
      > not here.
      >
      > Satyam
      >
      >
      >
      > Christian Tiberg wrote:
      > > Hello!
      > >
      > > I think that I've found a bug. Or I'm rather sure of it, actually.
      > > Line 7264 of datatable.js starts a loop:
      > >
      > > for(; i>nIterEnd; i--) {
      > > elTbody.deleteRow(-1);
      > > }
      > >
      > > I think the purpose is to clean off the Loading message and any
      > other
      > > stray rows when the table is empty. But IE doesn't like this. So
      > the
      > > table is left with the message still display, "Loading data...".
      > And
      > > an error message is displayed.
      > >
      > > Is this caused by the datatable having a separate tbody for the
      > > mesage, perhaps? I tried an alert(elTbody.rows.length) there,
      > and it
      > > reported 0, so there's nothing to delete. Maybe an if statement
      > > strategically placed would solved the problem?
      > >
      > > Best regards,
      > > Christian Tiberg
      > >
      > > ----------------------------------------------------------
      > >
      > >
      > > No virus found in this incoming message.
      > > Checked by AVG - http://www.avg.com
      > > Version: 8.0.175 / Virus Database: 270.8.5/1762 - Release Date:
      > 02/11/2008 9:51
      > >
      > >
      >
      >
      >
      > ----------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG - http://www.avg.com
      > Version: 8.0.175 / Virus Database: 270.8.5/1762 - Release Date: 02/11/2008 9:51
      >
      >


    • Frank Dietrich
      Well, that might be, but it happens for every datatable without rows in our project, and only in IE. I ll have to do something about it here, but don t feel
      Message 2 of 15 , Nov 3, 2008
        Well, that might be, but it happens for every datatable without rows in our project, and only in IE. I'll have to do something about it here, but don't feel comfortable editing YUI code... Putting "if (elTbody.rows.length > 0) " in front of the offending line fixes it, but that'd require us to do this fix for every future release :(
         
        without completely following this thread, could You not rather create one record either from the client or from the server-side if the record source is empty and the browser is IE?

         
      • Christian Tiberg
        That doesn t seem feasible.. Then the users wouldn t see the message about no records, but instead a bogus record for which there is no data. This would
        Message 3 of 15 , Nov 3, 2008
          That doesn't seem feasible.. Then the users wouldn't see the message about no records, but instead a bogus record for which there is no data. This would require changing the logic for every datatable in the project, in order to know what to do with this bogus row, i.e. when it's selected for deletion, double clicked for modification and so on.

          Best regards,
           Christian Tiberg


          2008/11/3 Frank Dietrich <fdietrich@...>

          Well, that might be, but it happens for every datatable without rows in our project, and only in IE. I'll have to do something about it here, but don't feel comfortable editing YUI code... Putting "if (elTbody.rows.length > 0) " in front of the offending line fixes it, but that'd require us to do this fix for every future release :(
           
          without completely following this thread, could You not rather create one record either from the client or from the server-side if the record source is empty and the browser is IE?

           


        • Frank Dietrich
          sure, but before editing the YUI-Code, I d rather create my own no data record or manually hide the complete table showing a placeholder,... something
          Message 4 of 15 , Nov 3, 2008
            sure, but before editing the YUI-Code, I'd rather create my own "no data" record or manually hide the complete table showing a placeholder,...  something thelike.
             
            Another idea would be subclassing the datatable (Satyam has two articles on that) and overwrite just the method in question.

            *********** REPLY SEPARATOR ***********

            On 03.11.08 at 12:12 Christian Tiberg wrote:
            That doesn't seem feasible.. Then the users wouldn't see the message about no records, but instead a bogus record for which there is no data. This would require changing the logic for every datatable in the project, in order to know what to do with this bogus row, i.e. when it's selected for deletion, double clicked for modification and so on.

            Best regards,
             Christian Tiberg


            2008/11/3 Frank Dietrich <fdietrich@...>

            Well, that might be, but it happens for every datatable without rows in our project, and only in IE. I'll have to do something about it here, but don't feel comfortable editing YUI code... Putting "if (elTbody.rows.length > 0) " in front of the offending line fixes it, but that'd require us to do this fix for every future release :(
             
            without completely following this thread, could You not rather create one record either from the client or from the server-side if the record source is empty and the browser is IE?

             


          • Frank Dietrich
            That doesn t seem feasible.. If Your Loading-Message stays, are You sure, Your e not having an error somewhere? YUI s async requests and other methods
            Message 5 of 15 , Nov 3, 2008

              That doesn't seem feasible..
              If Your "Loading-Message" stays, are You sure, Your'e not having an error somewhere? YUI's async requests and  other methods sometimes are located within TRY...CATCH, thus errors don't really come up. there might be an array access somewhere going into nowhere due to zero records. something like that
               
               
            • Christian Tiberg
              I m not *sure* of anything, except that adding the if statement I put above solves the problem. How the problem occurs or why isn t clear yet. My first
              Message 6 of 15 , Nov 3, 2008
                I'm not *sure* of anything, except that adding the if statement I put above solves the problem. How the problem occurs or why isn't clear yet. My first instinct is to look at YUI, since the problem occurs on several independent data tables, which share no code other than YUI.

                I had to push an update to a customer running IE primarily, and had to solve the problem. Editing one line in YUI seemed simpler than copying the huge render() method, and overriding it. It also seemed simpler than spending time on locating the problem source, which we'll of course be doing independently, as soon as we have the time available.

                Thanks for your input!

                Best regards,
                 Christian Tiberg


                2008/11/3 Frank Dietrich <fdietrich@...>


                That doesn't seem feasible..
                If Your "Loading-Message" stays, are You sure, Your'e not having an error somewhere? YUI's async requests and  other methods sometimes are located within TRY...CATCH, thus errors don't really come up. there might be an array access somewhere going into nowhere due to zero records. something like that
                 
                 


              • Frank Dietrich
                ...I had to push an update to a customer running IE primarily, and had to solve the problem. sure, these are the situations where we need a solution *now* and
                Message 7 of 15 , Nov 3, 2008
                  ...I had to push an update to a customer running IE primarily, and had to solve the problem.
                   
                  sure, these are the situations where we need a solution *now* and have to throw theory and "good behaviour" overboard. Later, when the big stress is over, one has more time to see what actually happened and what is the best solution.
                   
                  regards
                   
                  Frank 
                • Lucas Smith
                  ... Line 7264 ... other stray ... is left ... message is ... reported 0, so ... placed would ... Christian, Please submit a bug report in SourceForge,
                  Message 8 of 15 , Nov 3, 2008
                    --- In ydn-javascript@yahoogroups.com, "Christian Tiberg"
                    <ctiberg@...> wrote:
                    >
                    > Hello!
                    >
                    > I think that I've found a bug. Or I'm rather sure of it, actually.
                    Line 7264
                    > of datatable.js starts a loop:
                    >
                    > for(; i>nIterEnd; i--) {
                    > elTbody.deleteRow(-1);
                    > }
                    >
                    > I think the purpose is to clean off the Loading message and any
                    other stray
                    > rows when the table is empty. But IE doesn't like this. So the table
                    is left
                    > with the message still display, "Loading data...". And an error
                    message is
                    > displayed.
                    >
                    > Is this caused by the datatable having a separate tbody for the mesage,
                    > perhaps? I tried an alert(elTbody.rows.length) there, and it
                    reported 0, so
                    > there's nothing to delete. Maybe an if statement strategically
                    placed would
                    > solved the problem?
                    >
                    > Best regards,
                    > Christian Tiberg
                    >

                    Christian,

                    Please submit a bug report in SourceForge, preferably with a
                    simplified repro case. We certainly don't want errors popping up, so
                    if it can be shown to be a bug, we can add verbiage and a workaround
                    to the online documentation until a fix is rolled out in an upcoming
                    release.

                    https://sourceforge.net/tracker2/?func=add&group_id=165715&atid=836476

                    Thanks,
                    Luke
                  • Christian Tiberg
                    Hello! Thanks for your reply. I will submit a bug report as soon as I have narrowed it down to where the bug is. What I know for a fact is that two separate
                    Message 9 of 15 , Nov 4, 2008
                      Hello!

                      Thanks for your reply. I will submit a bug report as soon as I have narrowed it down to where the bug is. What I know for a fact is that two separate projects (with mostly YUI and some support routines in common) both show the error. The other project is big enough to be mostly unusable in the current IE, that was why I hadn't tested this behaviour in it.

                      Best regards,
                       Christian Tiberg


                      2008/11/3 Lucas Smith <lsmith@...>

                      --- In ydn-javascript@yahoogroups.com, "Christian Tiberg"


                      <ctiberg@...> wrote:
                      >
                      > Hello!
                      >
                      > I think that I've found a bug. Or I'm rather sure of it, actually.
                      Line 7264
                      > of datatable.js starts a loop:
                      >
                      > for(; i>nIterEnd; i--) {
                      > elTbody.deleteRow(-1);
                      > }
                      >
                      > I think the purpose is to clean off the Loading message and any
                      other stray
                      > rows when the table is empty. But IE doesn't like this. So the table
                      is left
                      > with the message still display, "Loading data...". And an error
                      message is
                      > displayed.
                      >
                      > Is this caused by the datatable having a separate tbody for the mesage,
                      > perhaps? I tried an alert(elTbody.rows.length) there, and it
                      reported 0, so
                      > there's nothing to delete. Maybe an if statement strategically
                      placed would
                      > solved the problem?
                      >
                      > Best regards,
                      > Christian Tiberg
                      >

                      Christian,

                      Please submit a bug report in SourceForge, preferably with a
                      simplified repro case. We certainly don't want errors popping up, so
                      if it can be shown to be a bug, we can add verbiage and a workaround
                      to the online documentation until a fix is rolled out in an upcoming
                      release.

                      https://sourceforge.net/tracker2/?func=add&group_id=165715&atid=836476

                      Thanks,
                      Luke


                    • MikeHatfield
                      (Apologies for the empty message - seems the group s Rich Text editor doesn t like WebKit!) I can reliably reproduce this bug by adapting the Local XML Data
                      Message 10 of 15 , Nov 14, 2008
                        (Apologies for the empty message - seems the group's Rich Text editor doesn't like WebKit!)

                        I can reliably reproduce this bug by adapting the "Local XML Data" DataTable example (http://developer.yahoo.com/yui/examples/datatable/dt_xhrlocalxml.html)

                        The problem seems to stem from the renderLoopSize property and an empty resultset.

                        Bug reported here:
                        https://sourceforge.net/tracker2/?func=detail&aid=2286608&group_id=165715&atid=836476

                        Thanks,
                        Mike
                      • Eric Miraglia
                        Thanks for reporting the bug, Mike; we ll take a look. -Eric
                        Message 11 of 15 , Nov 14, 2008
                          Thanks for reporting the bug, Mike; we'll take a look.

                          -Eric


                          On Nov 14, 2008, at 2:08 PM, MikeHatfield wrote:


                          (Apologies for the empty message - seems the group's Rich Text editor doesn't like WebKit!)

                          I can reliably reproduce this bug by adapting the "Local XML Data" DataTable example (http://developer. yahoo.com/ yui/examples/ datatable/ dt_xhrlocalxml. html)

                          The problem seems to stem from the renderLoopSize property and an empty resultset.

                          Bug reported here:
                          https://sourceforge .net/tracker2/ ?func=detail&aid=2286608&group_id=165715&atid=836476

                          Thanks,
                          Mike


                        Your message has been successfully submitted and would be delivered to recipients shortly.