TypeError: Cannot read property 'get' of undefined

I just updated Liana v6 today.

It seems I’ve got problems when I create (or edit) an entry that contains dropdowns and selects (autocomplete). I can’t fill my form.

Error when I open the form:

Error when I click on a date input:

Error when I click on a select:
Capture d’écran 2020-12-03 à 18.09.28

It concerns the collection Fundings and my project is lereacteur-admin.

I use:

    "database_type": "MongoDB",
    "liana": "forest-express-mongoose",
    "liana_version": "6.3.9",
    "engine": "nodejs",
    "engine_version": "10.16.3",
    "framework": "other",
    "framework_version": null,
    "orm_version": "5.8.13"

Hi @XavierColombel,
I guess you followed the documentation on upgrading, do you have any logs on your liana ?
Can you compare your previous forestadmin-schema.json with the new one ?

Here is my schema update:

And yes I’ve upgraded before with 6.3.5.

Inspecting the source, I’ve got this:

Capture d’écran 2020-12-03 à 18.45.05

t = undefined

That’s weird :thinking:
Can you try to clean your cache ?

If it doesn’t work, can you check where this method is called ?

It doesn’t work.

On which environment do you have this issue ?

I’ve got errors on both : dev and prod

On you first screen click on the line that start with at a.value just after the at addQueryTimezone and put a breakpoint there.
Is this.get('field.referenceModel') returning something ?

Is this what you’re looking for ?

No before on the a.value. You should see a line that looks like: this.addQueryTimezone(this.get('field.referenceModel.rendering.environment'));

Am I wrong again ?

Okey perfect :slight_smile: ! now in there, can you send me the value of field.referenceModel and field :pray:

field.referenceModel is null

field is a loooong object, which key would you like? :grinning_face_with_smiling_eyes:

Copy paste the entire object please :pray: or do a toJSON() on it :wink:

field value :

{
  "fieldName": "facture",
  "displayName": "Facture",
  "description": null,
  "isReadOnly": true,
  "isFilterable": false,
  "widgetEdit": {
    "name": "belongsto dropdown",
    "parameters": {}
  },
  "widgetDisplay": {
    "name": "text",
    "parameters": {}
  },
  "mappingValues": [],
  "conditionalFormatting": null
}

Hi @XavierColombel :wave: what i can seen on your project, the field facture doesn’t have any reference. I don’t really understand how can you set a BelongsTo select widget.
I think you can fix your issue by select another widget in field settings.

Let me know if it’s help.