Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[9.0.1+] Uncaught TypeError: Cannot read property 'validateCell' of undefined #8268

Closed
AMBudnik opened this issue Jun 23, 2021 Discussed in #8263 · 13 comments · Fixed by #9476
Closed

[9.0.1+] Uncaught TypeError: Cannot read property 'validateCell' of undefined #8268

AMBudnik opened this issue Jun 23, 2021 Discussed in #8263 · 13 comments · Fixed by #9476
Assignees
Labels
bug Core: Validation Plugin Formulas Plugin Regression Issues that were created while adding new changes to the source code Status: Released

Comments

@AMBudnik
Copy link
Contributor

Description

As mentioned by @haraleib when data to a virtual sheet is added Handsontable tries to validate that as well. As the second sheet is not an instance of Handsontable we get an error.

Issue transferred from discussion #8263

Originally posted by haraleib June 22, 2021
Encountered the exception "Uncaught TypeError: Cannot read property 'validateCell' of undefined" with handsontable version 9.0.1, which works in version 9.0.0.

When using two sheets inside one hyperformula instance, I get this Exception if the second sheet has formulas which reference to the first sheet.

jsfiddle Example: https://jsfiddle.net/1yrfujg8/1/

How to reproduce it in the provided example:

  • Open Browser-Debugger
  • Type in a value, as mentioned in the screenshot

image

Exception in the browser debugger

image

@AMBudnik AMBudnik added bug Core: Validation Plugin Regression Issues that were created while adding new changes to the source code HyperFormula labels Jun 23, 2021
@haraleib
Copy link

haraleib commented Jan 7, 2022

Is there any new information for this bug? Unfortunately this is a regression for me to update from V9 to a newer Version of Handsontable.

@AMBudnik
Copy link
Contributor Author

Hi @haraleib this issue hasn't been scheduled yet. If you have a short deadline on that specific use case please email me at support@handsontable.com

@vipina1019
Copy link

any update on this issue?

@haraleib
Copy link

Tried to update today to V11.1.0 to see if it is fixed indirectly through some other issues, but as expected the problem is still there.
I think to encourage/improve the usage of hyperformula with handsontable it should be scheduled for one of the next releases, as this regression makes it impossible to update,.. unfortunately.

@AMBudnik
Copy link
Contributor Author

The v12 and v12.1. are already fully booked. But if you would need to get this issue solved now we can offer consulting services, as we have a separate team there. If you are interested @vipina1019 @haraleib please contact me at support@handsontable.com

@sequba
Copy link
Contributor

sequba commented Mar 22, 2022

In my opinion the root cause of this problem is that sheet2 (in jsfiddle example) is not attached to any hot instance while Formulas Plugin tries to call hot methods on it.

I didn't test it but it should be sufficient to add the following code to this line

if (!hot) {
  return;
}

@haraleib
Copy link

In my opinion the root cause of this problem is that sheet2 (in jsfiddle example) is not attached to any hot instance while Formulas Plugin tries to call hot methods on it.

I didn't test it but it should be sufficient to add the following code to this line

if (!hot) {
  return;
}

@AMBudnik I tested the fix and the fix works as expected. Already using it in production.
Would be cool if the fix find its way in the official release soon :-)

@AMBudnik
Copy link
Contributor Author

Thank you for feedback, @haraleib
The issues are added to the next milestone. If there won't be any unexpected changes in our plans we will add the changes to the next version after v12.0. I will keep you updated.

@haraleib
Copy link

Sounds great, thank you for your answer @AMBudnik

@aninde
Copy link
Contributor

aninde commented May 13, 2022

Demo with v12.0.1 https://jsfiddle.net/jLf09mz5/1/ still didn't work, but with a different warning, however e2e test with this case passed. @budnix can you check it?

@budnix
Copy link
Member

budnix commented May 13, 2022

Demo with v12.0.1 https://jsfiddle.net/jLf09mz5/1/ still didn't work, but with a different warning, however e2e test with this case passed. @budnix can you check it?

The error is related to the wrong HF API usage. Fixed demo https://jsfiddle.net/tL04mqnv/.

@aninde
Copy link
Contributor

aninde commented May 13, 2022

@budnix thank you for spotting that :)

@AMBudnik
Copy link
Contributor Author

@haraleib @vipina1019 we just released Handsontable v12.0.1 with fixes for this issue.

Here https://handsontable.com/docs/release-notes/ is the full list of changes in the latest patch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core: Validation Plugin Formulas Plugin Regression Issues that were created while adding new changes to the source code Status: Released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants