You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems, that currently most of the metadata is build in the Javascript functions of metaedit.js. But at the same time, adding a tag also creates the structure, but it looks like there's some small difference. So why is it necessary to create the structure in the js, if we have a function in the django backend which can create at least the basic structure from table data? Why not use this data, to provide a basic structure directly as json even if the data does not exist on the server?
I also did a quick check comparing the two json structures, and there basically identical. There are no different keys, only the tag-version has a few more sub attributes.
And with that, the editor is shown directly as for other basic metadata. But if you now enter some data, this data is not submittable. (see next issue).
Description of the issue
If you create a new table, add a tag and then try to edit it's metadata, this fails.
Javascript is throwing an error:
Uncaught TypeError: can't convert undefined to object
It's fine before adding the tag. Looks like something is happening there, which the javascript (metaedit.js) does not like.
Steps to Reproduce
Ideas of solution
And now a bit more of architectural thing:
I also did a quick check comparing the two json structures, and there basically identical. There are no different keys, only the tag-version has a few more sub attributes.
Dig into concrete problem
oeplatform/dataedit/static/metaedit/metaedit.js
Lines 138 to 144 in 5ba2138
So I added some debug code to fixRecursive, before line 142:
And this leads gives some output and ends with:
Interesting here is, that elemObject, which is checked previously is null.
So one idea would be, adding a check for that to line 140.
And with that, the editor is shown directly as for other basic metadata. But if you now enter some data, this data is not submittable. (see next issue).
Context and Environment
Workflow checklist
The text was updated successfully, but these errors were encountered: