elexis-eu / elexifier

https://elexifier.elex.is
3 stars 3 forks source link

creating a new transformation from an existing transformation gives error #35

Open inl-ct opened 2 years ago

inl-ct commented 2 years ago

I have created a transformation for the ISLEX file. Now I want to create a new transformation based on the existing transformation, but I can't do this and keep getting an error message. I use the 'new transformation' button at the bottom of the transformation screen.

andrazrepar commented 2 years ago

@inl-ct, is this file in the shared account?

andrazrepar commented 2 years ago

@LukeItUp Can you check this? It seems to happen with every dictionary, not just ISLEX?

LukeItUp commented 2 years ago

I noticed that the first call to api, which creates new transformation has empty field for headword, which might break the process.

POST /api/transform/new
BODY: {"configurationId": XFID, "entry_spec":"entry" ,"hw":"", "xfname":"copy-xf", "dsuuid":"a", "dsid":DSID }
andrazrepar commented 2 years ago

what do we need to solve this? another call to the database to get the headword?

andrazrepar commented 2 years ago

Hi, I did some digging into this. The dictionary where this error appears is here: https://app.elexifier.elex.is/dictionaries/xml/703/transformations/605

This is what I am doing:

image

It seems to work with other dictionaries, like this one in the staging deployment: https://staging.elexifier.elex.is/dictionaries/xml/90/transformations/65

However, in both cases the "hw" parameter is empty: {"configurationId":605,"entry_spec":"LexicalEntry","hw":"","xfname":"test_andraz","dsuuid":"a","dsid":703}

gradisarjoze commented 2 years ago

What needs to be done here?

andrazrepar commented 2 years ago

@LukeItUp can you have a look? I tested some more with the dictionary above. It seems to me that the error occurs if the headword parameter is path Lemma/feat as in AMIIS-ISLEX-v1. Whereas it works fine if it is just a simple element Lemma as in test-andraz.

You can try creating the a new transformation from these two configurations to see the error.