culturecreates / footlight-app

Footlight CMS Front-end
https://cms.footlight.io
3 stars 0 forks source link

event gets buggy when remove content from one language in bilingual site #1380

Closed troughc closed 1 month ago

troughc commented 1 month ago

event that was published cannot have language content removed without issues. Please see this event

This event started as a draft. I published it, and then went back into it and removed the english language title and description. when I tried to save it as a published event but I could not (error that mandatory fields were missing). So I saved it as a draft event. I went back in and the english language title and description fields were still empty.

Expected behaviour:

We need to revisit the logic of how language literals work.

troughc commented 1 month ago

@SyamBabu-M something isn't working for me, let's look together monday if necessary. For this event (and others) I removed the Japanese field then repeated the steps and still got the error. In addition, the different screens don't line up: Read only view shows content in the field for japanese: Image Edit form shows it empty in it: Image

Then when I try to save, i get the error.

SyamBabu-M commented 1 month ago

Read only view shows content in the field for japanese:

Those are the language fallback. This was implemented as part of #1001.

I have fixed the other bug.

troughc commented 1 month ago

when try to create a new event and click save (as draft) an error is thrown in the console.

troughc commented 1 month ago

Tested: PASSED @SyamBabu-M just in case - how do I check to see if an error was thrown in the console? I didn't see one but maybe i need to test something specific?

SyamBabu-M commented 1 month ago

@troughc The error we were facing earlier was thrown during the payload generation(the function that create data that needs to be send to backend). This can be seen in the console. To open the console press cmd + option + j find the console and open the errors section from the sidebar. You can find all the warnings and errors there. If a critical error is thrown, the app will redirect to the error page by itself. Image