I used template variables to create translations. For some reason, in the live server, some small words were blank. I had the exact same issue in the DEV server with the same words, but I just re-uploaded the variable file to the server again, and they showed up in the site fine. In some cases, I put random garbage to force the change.
In the production site, they are blank. On the site GUI they don’t show. I checked the files, they are very tiny files, 4-8 bytes, (one word). The same permissions, I compared them byte by byte. It only happens with a few small files. I checked the permissions on the live server, I even executed cat template-var-file.html in the server to make sure the content was there.
Nothing worked. In the site it was just blank where the variable is supposed to show in the template. Clearing the caches in EE did not help either.
So I logged into the admin panel and decided to go to Templates > Template Variables and clicked on the file. For my surprise, the Content field is empty and completely blank. No wonder they don’t display on the site. I decided to do 2 tests. But the file does have content. It’s just EE that does not read the file properly or thinks it’s empty.
I manually edited the file on the server with the VI editor. Saved. It automatically appeared on the site.
Decided to edit another blank file on the EE admin GUI. Now it also appears.
Does someone see the issue here?
Re-uploading the file as many times as you want does not work. For some reason, EE 6 will skip or ignore tiny template variable files. I did not create them from the EE web interface, but on my IDE, and just uploaded them to the server.
But once you edit them on the server, probably the timestamp changes and EE now detects it as changed and loads the file.
This is clearly some bug and issue with small size template variable files and how it tries to read the content inside them, or how it syncs the template files on the server with the Expression Engine.
Developers should check the code and how it’s trying to read the template files for tiny byte files. Something is definitely off.