-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[8.0][web_widget_x2many_2d_matrix] Cannot read property 'id' of undefined #321
Comments
This widget is quite picky about the data. What code do you use to populate the field and how does the internal data structure look? |
The python code :
The XML CODE : |
@hbrunn : I will make a video showing you the scenario which produce the error |
that will be helpful. From your code it looks very good, I don't see anything that might be causing the problem |
@hbrunn The error was in this function // return row id of a coordinate get_xy_id: function(x, y) { return this.by_x_axis[x][y]['id']; }, when i logged the x & y values It gives me the value of x is "undefined" x=1 y=1 |
interesting. So something seems to go wrong if the widget is build repeatedly. Do you see any patterns here, like the 3rd time you open this, the error occurs? Any patterns in the values filled in? And does a reload fix the problem temporarily? |
Always the error occurs. but when i save the form there is no problem, |
The error occurs in the changed field. when i change x1y1 it stops @ x1y1 when i change x3y1 it stops @ x3y1 |
Any idea about sorting the x fields or y fields (not sorted by id by default) ? |
hmmm, I'm running out of ideas here. I think I need to debug what's going on here. Could you please provide a minimal example module that exposes this behavior when being installed in an empty database with demo data? Then we should be able to fix the problem. |
@hbrunn |
yes, makes sense, you should find my mail address on the github profile or the oca site |
@hbrunn |
@DayssamAgora this should be fixed in #327. Next time somebody asks you for a minimal example that produces the error, please actually provide a minimal example. I had to dive through a lot of unnecessary code, and you're lucky I was curious about that problem, otherwise I'd have put this back to you |
@hbrunn 👍 Many thanks , I will post a minimal example that produce the error. |
now it's solved, so not necessary now. That was just a tip for the future |
but please review my PR and if it solves your problem, give a thumbs up there. This issue will be closed automatically when the code is merged |
it's done 👍 |
[FIX] fix #321, choked on cached writes
fixed by merging #327 a while ago |
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix #321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
* README update to newest OCA template * Example in README * Massive performance boost for big matrices, specially on Firefox * Assign id on row in order to find it back in all cases * Fix OCA#321, choked on cached writes
Hi everyone,
I got this error when i want to re show the matrix
Uncaught TypeError: Cannot read property 'id' of undefined
http://localhost:3000/web_widget_x2many_2d_matrix/static/src/js/web_widget_x2many_2d_matrix.js:215
I debuged the javascript code
the error was in this function
// return row id of a coordinate get_xy_id: function(x, y) { return this.by_x_axis[x][y]['id']; },
when i logged the x & y values
It gives me the value of x is "undefined"
x=1 y=1
x=2 y=1
x=3 y=1
x=4 y=1
x=5 y=1
x=6 y=1
x=7 y=1
x=8 y=1
x=9 y=1
x=10 y=1
x=11 y=1
x=undefined y=1
Normally i have only 11 rows
and it iterates only the first column
The text was updated successfully, but these errors were encountered: