Uncaught TypeError: Cannot read property 'length' of undefined

This error occurs after I have loaded a word document (.docx) using the supplied .Net Core example code from the backend server and am displaying in a DocumentEditorContainer. 

While editing the document, when I try to delete a table row this error is thrown and the table row is not deleted visually. However the row IS deleted after I click off of a table object in the document editor. After doing this, the rows are deleted (or the layout is recalculated).

Using:

  • Vue.js 2.6.11
  • .Net Core 3.1. 
  • SyncFusion ej2-vue-documenteditor 19.2.56.
  • Chrome  92.0.4515.159 64-bit


Uncaught TypeError: Cannot read property 'length' of undefined    

at Layout.reLayoutOrShiftWidgets (layout.js?1373:6552)    
at Layout.shiftLayoutedItems (layout.js?1373:6489)    
at Editor.reLayout (editor.js?460d:6847)    
at Editor.deleteRow (editor.js?460d:10522)    
at TableProperties.onDeleteRow (table-properties-pane.js?8c32:271)

Attachment: Capture_3f851a3.7z

13 Replies

SM Suriya Murugan Syncfusion Team August 26, 2021 03:43 AM UTC

Hi DT, 
 
Syncfusion Greetings! 
 
We tried to reproduce the reported issue but couldn’t. We suspect that the reported problems are might be due to the table in the input word document which used at your end. We need to investigate with the contents in your input Word document to reproduce the exact problem at our end. So, could you please provide us the input Word document which used at your end. Thereby, we will analyze further and provide you the appropriate solution at the earliest. 
  
Note: If you have any confidential data in your Word document, please replace with some dummy data and provide us the same. We just need your document to recreate the problem you face. 
 
Regards, 
Suriya M. 



DT Doug Thierjung August 26, 2021 04:39 PM UTC

Thank you for the response. I have attached a sample word doc which should reproduce the error. Please let me know if you need additional info on this, or if a short clip would help.


Thank you.


Attachment: SampleDoc_37841bf5.7z


DT Doug Thierjung August 26, 2021 05:13 PM UTC

Further to my last response, is there a particular way the table should be formatted in a .docx to best transfer to SyncFusion's DocumentEditor. I appear to have mixed results with table spacing in different .docx files.

For example, the previously attached sample doc (above) renders the table with the same row/cell vertical spacing as in the original Word doc. However in a different Word doc, all the tables in it seem to have their vertical row/cell spacing doubled (example below).

Neither table in the different documents have any special formatting so far as I can tell.

Original:

Original Document Spacing.PNG


Rendered:


The above demonstrated sizing difference occurs throughout the entire document, this is just a snip.

I understand about SF's pagination and the difference between Word's sizing vs HTML, but since this occurs in different documents, it would seem to be something about the documents themselves rather than SyncFusion.


Thank you.



SM Suriya Murugan Syncfusion Team August 27, 2021 03:03 AM UTC

Hi DT, 
 
## Uncaught TypeError: Cannot read property 'length' of undefined 
 
We can reproduce the reported issue. Currently, we are validating the reported issue and get back to you by August 31,2021. 
 
## Table spacing issue 
 
Can you please share the sample document to recreate the issue in our side? that will be helpful for us to proceed further and provide you solution at earliest. 
 
Regards, 
Suriya M. 



DT Doug Thierjung August 27, 2021 09:05 PM UTC

Hello,

I've attached a sample doc that should recreate the table spacing issue that I was referring to in my last comment.

Thank you again.


Attachment: SampleSpacingDoc_df10315e.zip


KB Kurthis Banu Abdul Majeeth Syncfusion Team August 30, 2021 10:28 AM UTC

Hi DT,  

Regarding: Table spacing issue   

We have checked the provided document. It contains table style. Currently, document editor doesn’t provide support for table style. We have already logged this as feature request. We will include it in any of our upcoming release. 
 
You can track the status of feature through below feedback link:  

Please up-vote this feature request to make this feature request as our priority.     

 Regards, 
Kurthis Banu A. 



DT Doug Thierjung replied to Kurthis Banu Abdul Majeeth August 30, 2021 02:25 PM UTC

Regarding the table spacing issue, would you be able to say what constitutes a table style? Are the changing of the borders, row spacing, column width, etc all considered table style with respects to SyncFusion's current support of it?


Thank you.



KB Kurthis Banu Abdul Majeeth Syncfusion Team August 31, 2021 09:55 AM UTC

Hi DT, 
 
Regarding: To remove the table style 

1.       Click anywhere on the table, then click the Table Design tab on the right side of the Ribbon. 
2.       Locate the Table Styles group, then click the More drop-down arrow to see all available table styles. 
3.       And then click “Clear” option to remove the table style and resave the document. 

For your better understanding we had attached video demonstration in below link. 

Video Link: 

Resaved Document: 

Please let us know if you have any other questions. 

Regards, 
Kurthis Banu A. 



DT Doug Thierjung replied to Kurthis Banu Abdul Majeeth August 31, 2021 02:36 PM UTC

This is great - thank you!



KB Kurthis Banu Abdul Majeeth Syncfusion Team August 31, 2021 03:36 PM UTC

Hi DT,  
  
Regarding: Uncaught TypeError: Cannot read property 'length' of undefined  
 
We are facing difficulty to find the exact cause of the issue and need additional timeline to validate the reported issue. We will update further details by September 2,2021.    

Regards, 
Kurthis Banu A. 



SM Suriya Murugan Syncfusion Team September 3, 2021 03:27 AM UTC

Hi DT, 

We have confirmed the reported issue as bug and logged the defect report. We will fix this issue and include in our EJ2 patch release which scheduled on October 6,2021. 

You can track the status of bug through below feedback link: 


Regards, 
Suriya M. 



SM Suriya Murugan Syncfusion Team October 7, 2021 05:31 AM UTC

Hi DT,   

We deeply regret for the inconvenience caused.     

We are not possible to include the fix in our latest patch release. We will fix this issue and include in our EJ2 patch release which scheduled on October 20,2021.   

You can track the status of bug through below feedback link:   

Regards,  
Suriya M. 



SM Suriya Murugan Syncfusion Team October 21, 2021 03:40 AM UTC

Hi DT,    


 
We are glad to announce that our patch release (v19.3.46) is rolled out successfully and In that release, we have added fix for reported issue.  

Please upgrade the package to latest version to resolve this issue.          
        
Client side:      



 


 
Regards, 
Suriya M. 



Loader.
Up arrow icon