Randomly get a blank view when I upload a blade file to the server
Hello,
as the title say I have this small bug, since I upgraded to Laravel 5.8, when I update a view and upload the file (by sftp) to the server, 75% (I would say) of the time I get a blank page or a blank view and I have to re-upload right away 2 or 3 times until it show the full file.
Its not a server issue or a CHMOD issue, the file on the server is the exact same size as the local file and I only get this bug with blade file, It also seem to happen more on the websites where I have huge traffic...
My guess would be that the blank view is a result of a cache system who see a change in filesize and so choose to cache the view before the upload is finish..
Is this a know issue ? Is there a fix ? (I dont want to upgrade Laravel)
@Snapey thank you, I do it already sometime but at this point its faster for me to re-upload my files.
What I dont get is why the cache of the view is updated when the filesize is at 0 (when I start the upload) but not later when the file is bigger, it doesnt make sens.
@laouch I think it looks at the timestamp of the file, so if the clock is different between your local machine and the fileserver it does not notice that the uploaded view file is newer than the cache.
@laouch No, never edit the vendor file. You should check for the time difference. You can get your new file to take by adjusting its timestamp to a time that makes it newer. Ideally make the server and your local dev have the same time
@Snapey but whatever timestamp I use, that doesn't prevent the file to be cached before the end of the upload, I will still need to re-upload a few times. I dont have the issue on small websites because no one is visiting / "querying" the file while its still uploading.
Clearing the view cache seem to be the only solution.