#3943 (Uncaught TypeError: rowData is undefined)
by Luc Saffre · in Developers · assigned to Luc Saffre
Résumé
The current react master is broken. Getting a blank screen in several places. This happened somewhere after the last release to pypi.
Concepts sous-jacents
Commentaires
- 5 ans, 8 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : Crazy! I fixed the issue! Just because I was waiting for Aris to help me! The mere fact of formulating your question helps you to find the answer. As usual. Instead of saying "onEditorInit(cellProps) { let {rowData, field} = cellProps; ... }" we must say "onEditorInit(e) { let {rowData, field} = e.c...
- 5 ans, 8 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : Aha, the issue is probably caused by the new primereact feature [url github.com/primefaces/primereact/issues/1504 1504] (Add onEditorInit callback for cell editing mode to Column), which was added in PR 5.0 (August 2020).
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : The [url webpack.js.org/blog/2020-10-10-webpack-5-release/ Release notes for webpack 5] are very empathic. Nice :-)
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : OMG: ncu -u also upgraded webpack from 4 to 5, ant it seems that some change in webpack causes "npm run debug" to fail.
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : New approach: I undid the merge (since it didn't help either), then run ncu -u to get the latest version of everything (even newer than the new versions introduced in 20210104), then started to debug everything as if it was new code. A first warning: Failed prop type: Actor: prop type `mt` is invali...
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : The last thing to try: I merged back datetime.js into LinoComponents.js. This too doesn't help. So now I have tried to restore everything to the state before 20210104 but the bug is still there. It must be a very stupid bug if it's such a tough one...
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : I also did npm cache verify:
Cache verified and compressed (~/.npm/_cacache): Content verified: 4233 (170233276 bytes) Content garbage-collected: 551 (48724217 bytes) Index entries: 6520 Finished in 5.835s - 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : After reading [url stackoverflow.com/questions/15890958/how-to-install-a-previous-exact-version-of-a-npm-package this thread] I said "sudo npm install -g npm-check-updates". Now I can say "ncu" and it gives me a list of the packages for which there is a newer version. And this list seems to confirm ...
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : One more question before merging the datetime.sj : did my reverting of packages.json actually switch to the older versions? For example is babel/core now back at version 7.11.6 (instead of 7.12.10? Was it enough to simply change the packages.json and run webpack?
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : I also reverted the package.json to its version before 20210104 : nope, the problem remains. So my next step is to merge back the datetime.js into LinoComponents.js.
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : I am about to move back these three elements from datetime.js back to LinoComponents.js because I cannot find any other reason. But that would be frustrating because i would prefer to understand what was with moving them.
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : The big change in this commit is that I moved three widgets (DateFieldElement, IncompleteDateFieldElement, TimeFieldElement) from LinoComponents.js into a separate file datetime.js
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : It happened in commit [url github.com/lino-framework/react/commit/17f682f2e4041cd4b620f156b60462c85b1246d6 17f682].
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : But the problem does *not* occur e.g. in cal.MyEntries. So only some grids are broken...
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : Or in amici1 dashboard as robin, select [Persons] and then double-click on a row. But note that the detail of a person shows correctly when you click directly on a person link in the dashboard. So it's just the double-click in the grid that's broken.
- 5 ans, 9 mois ago by Luc Saffre about #3943 (Uncaught TypeError: rowData is undefined) : Something is broken in the react front end. For example runserver amici1, log in as robin, go to 127.0.0.1:8000/#/api/courses/MyActivities/ create an activity and then try to double-click on it to show the detail. White screen and js console says "Uncaught TypeError: rowData is undefined". I suspect...