Backend working fine, but all kinds of errors on front end

fstltna

Member
I kind of resolved this issue. My site was set to redirect http requests to https, and it appears VL doesn't like https servers. When I generate the screenshot now it displays, but the actual entry stays black...
 

Mark

Administrator
Staff member
VL works just fine with https, though I have had 1 other person have an issue with it that we were unable to resolve. You might try manually deleting the old black screenshot, though that should not be necessary.
 

Mark

Administrator
Staff member
I found it and deleted all three files. Regenerated the screenshot and it finally stuck. Thanks for the tip!
Interesting, that step should not be necessary but I will see what can do to streamline this in the future (perhaps run if exists -> unlink).
 

Basti

Administrator
Staff member
Mark i have the feeling the same thing happens here as with upload banner, where calling filesize() was cached by the server. When used several times on same image, this value gets cached and continues calls use old values if not cleared with clearstatcache()
In the screenshots we might have the same issue
Code:
    //Get size in bytes
    $weight = filesize("screens/{$cleanurl}.png");

   
    ////////////////////////
//Check for good image
if($weight < 13000) {
This gets called several times

If it uses the old black screenshot for filesize check a new image would not generate. And since things work once he deleted the old ones, this sounds quite likely.

So id say we need to use our core function for these, start a new base
Code:
    $base = new base;
First filesize is without second parameter,
Code:
$base->get_file_size($file_path)
following calls to same image have to use the second one to clear the cache
Code:
$base->get_file_size($file_path, true)
 
Top