I have started receiving errors inside of my simple list views and I’m not sure what is causing it.
When I attempt to “update” or “add”, a little red triangle appears and says “Save error: Field initialised with no name and no label”
The crash log also identifies the same error message, crash log can be found here:
https://drive.google.com/file/d/10Je7kxBStt32vIXLm62POWlPkY13mzoL/view?usp=share_link
Normally this is not an issue, I simply have to keep clicking next and finalize the saves for my View. However, at some point when I try to hit “Next” I get a "413 Request Entity Too Large", at which point editing my View becomes impossible.
The crash report points to:
(/home/saltcorn/.local/lib/node_modules/@saltcorn/cli/node_modules/@saltcorn/data/models/field.ts:98:13)
That .js file is the originator of the error, however I do not know where “label” or “name” are being sourced to determine how to fix this.
Any help would be appreciated.
};
/**
* Field Class
* @category saltcorn-data
*/
class Field {
/**
* Constructor
* @param o
*/
constructor(o) {
this.refname = "";
if (!o.name && !o.label)
throw new Error(`Field initialised with no name and no label`);
this.label = (o.label || o.name);
this.name = (o.name || Field.labelToName(this.label));
if (!o.type && !o.input_type)
throw new Error(`Field ${o.name} initialised with no type`);
this.fieldview = o.fieldview;
this.validator = o.validator || (() => true);
this.showIf = o.showIf;
…………….
Fixed! (I think)
Shortly after posting I discovered that one of my tables had a JSON field in it, I created this as a test and did nothing with it. All of the views which had the error were views tied to tables which were ultimately tied back to the table with the unused JSON field in it. By removing the JSON field, all of my Views started saving correctly again. Hope this helps the next guy.
мемес