Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static build should not allow for empty translations in blog pages. #504

Closed
KonradUdoHannes opened this issue Jul 1, 2023 · 6 comments
Closed
Labels
Coding Directus documentation Improvements or additions to documentation

Comments

@KonradUdoHannes
Copy link
Collaborator

Currently the static build successfully builds if blog posts have empty translations. This seems to negate the language fallback mechanism for blog posts (at least in some cases).

Either the fallback mechanism should be made more robust or the static build should fail in such a situation.

The real fix in either situation is to delete the empty translation in directus, but maybe we can make issues on the website less likely until its fixed in the cms. I also feel that fixing the issue in directus is not entirely straight forward, so I'm wondering how we can make sure that content creators know how to do it.

@KonradUdoHannes KonradUdoHannes added documentation Improvements or additions to documentation Coding Directus labels Jul 1, 2023
@jstet
Copy link
Member

jstet commented Jul 2, 2023

Yes i stumbled over the empty translation thing in the past already. Apparently, if u start to write something in directus, but then delete your text, its saved differently to when not starting a text at all.

But i thought the function i wrote handled this. Will check on monday.

Is this causing the bug described here?: #507

@KonradUdoHannes
Copy link
Collaborator Author

I also thought the I saw code handling the such an issue, but apparently it does not always work. I already fixed the issue in production before doing a full investigation because I didn't want to leave prod broken. We have to see how easily we can reproduce it. Maybe its an issue of the form '' vs ' ' and all of the sudden the string was not falsy.

Not sure whether its related to #507. I also noticed this issue already and was wondering but did not have time to look into it yet.

Either way I think its important that the content creators also know how to delete the empty translations in directus once it happens. Does anybody know a good place where we could document this?

@pr130
Copy link
Contributor

pr130 commented Jul 3, 2023

Today, we published first version of the docs for directus: https://docs.correlaid.org/wiki/infrastructure/directus-content-management-system

i'll send you the invite link to gitbook via DM for the future. but i can add this to the list of documentation todos and work on it.

@KonradUdoHannes
Copy link
Collaborator Author

@friep thanks. I added a section about removing empty translations to Tips and Tricks

@KonradUdoHannes
Copy link
Collaborator Author

Previews for blog posts are implemented (#513) This might help to create examples without affecting production for investigating this issue further.

@jstet
Copy link
Member

jstet commented Mar 6, 2024

with #679 it wont

@jstet jstet closed this as completed Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Coding Directus documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants