Saving a Low Variables file sometimes wipes out the database version of that variable
Hi Low,
I have an odd issue that I'm having a hard time tracking down.
I'm running Low Variables 2.4.0 on EE 2.7.3 and I have a set of Low Variables that are being saved as files. Sometimes, if I edit the file via a text editor and save the file/upload it to the server it is actually wiping out the variable_data for that variable in the exp_global_variables table. The file is definitely saving and being uploaded to the server correctly, but somewhere it runs into an issue and wipes out the database version of the variable.
If I go to Low Variables in the Control Panel, paste in the content of the file and save it there everything goes back to normal.
Any ideas? I'm not sure where the issue is occurring and it doesn't happen all the time. This is only happening with Low Variables files - all other template files are syncing fine.
Thanks for your help.
Replies
Low 3 Jan 2014 09:35
Well, as you can imagine, this is a difficult one to debug.
Is the uploaded file itself fine? Is the site you're uploading the file to a busy one? Is it always the same file that is emptied out?
Stephen 3 Jan 2014 14:34
Hi Low,
I know - it is an odd one.
The uploaded file itself is fine. If I just copy all of the text in the file and paste it into the Low Variable in the CP everything works fine.
It isn't the same file that is emptied out. I have 7 Low Variables that I'm saving as files and they all have this issue occasionally. Some of the files contain a lot of code - the header file for example, but some of them just contain a small amount of code - a list of options for a select list, for example.
The traffic on the site doesn't seem to be related because I was having this issue during development as well (on the same server) and there was no one on the site then.
Thanks for your help.
Low 3 Jan 2014 15:17
What PHP versions are you running? Are all variable properties (other than its contents) okay, like label and type-specific properties? When you notice the var being empty, are you looking at the front-end or at the CP?