Describe the Bug
When updating existing sent news in a language that does not yet have a translation, the system creates a translation even if both the Title and Content fields are empty.
Before MT for push notifications this was slightly different: translations were only created if at least one of Title or Content had content.
This can lead to unintended empty translations being saved resulting in a blank page inside the web app.
Steps to Reproduce
- Go to 'News'
- Open an already sent news object
- Select a language without a translation
- Leave content & title empty
- Click 'Update'
Expected Behavior
Based on the behavior before MT:
It shouldn't create the translation, if title AND content are empty
Before MT:
- Title & Content Empty = Nothing gets saved
- Title Empty & Content Not Empty = Saved without title
- Title Not Empty & Content Empty = Saved with only title
Possibly an indicator / warning message similar to other mandatory fields to show that at least title (or content) cannot be empty.
Actual Behavior
It creates the translation without content or title as nothing was typed in, but now the site on the web app for this language is an empty page.
Screenshot
Additional Information
Traceback
Related Issues
Summary of discussion and updates to the description
- Make title mandatory (Currently an empty string can be saved)
Describe the Bug
When updating existing sent news in a language that does not yet have a translation, the system creates a translation even if both the Title and Content fields are empty.
Before MT for push notifications this was slightly different: translations were only created if at least one of Title or Content had content.
This can lead to unintended empty translations being saved resulting in a blank page inside the web app.
Steps to Reproduce
Expected Behavior
Based on the behavior before MT:
It shouldn't create the translation, if title AND content are empty
Before MT:
Possibly an indicator / warning message similar to other mandatory fields to show that at least title (or content) cannot be empty.
Actual Behavior
It creates the translation without content or title as nothing was typed in, but now the site on the web app for this language is an empty page.
Screenshot
Additional Information
Traceback
Related Issues
Summary of discussion and updates to the description