Background

Posted in: Newspaper
Post count: 12

Hello all,

I have a problem with my backgrond not appearing in desktop for any post. Example:
http://soutaoboa.com/maes-filhas-vinculo-cura-vinculo-fere/

The image is in the post:
<div class="backstretch"><img src="http://soutaoboa.com/wp-content/uploads/2016/10/maes-filhas-vinculo-cura-vinculo-fere.jpg" /></div>

But the original styles are still being applied:

.td-backstretch {
    max-width: none;
    opacity: 0;
    transition: opacity 2s;
    display: block;
}

Since opacity is 0 it’s normal that it won’t appear any image. I assume that there is some javascript that is creating this element and change it if it’s desktop, mobile, and so on… but i didn’t find any information about that in the documentation.

One important things is that this behaviour seems to have appeared after we activated cloudflare and browser cache activated also on cloudflare. It is probably related to it but I need to have browser cache activated…

Can someone please help me here?

Thanks in advance.

  • This topic was modified 9 years by airanee.
  • This topic was modified 9 years by airanee.
Post count: 22421

Hello,

This is the most common javascript error we have encountered. It is in most cases created by plugin conflicts or javascript optimization or minify tools. Please disable all plugins except visual composer, clear cache and reset cdn files. Then test again. Also check for any js minify/optimization as these tools can also create js errors.
Also child themes can also affect this if you have any custom code in there that is not added properly or simply because the child theme was not updated.

Thank you!

Post count: 12

@Bogdna B. thanks for your answer.

It’s not an error. I checked in the console and it’s all fine. I will do some tests but can you please tell me how this background works? I just need to know what happens in the javascript so I can debug it.

I assume there is some code that checks if it is desktop and changes the class after load or something like that.

Can you point me in the right direction so I can keep browser cache working with CDN and also have the original background effect?

Thank you.

Post count: 22421

Hello,
This issue can be easily overcome by simply disabling the lazyload animation if you cannot do anything about the js conflict. Now your images will get the opacity of 1 from the start. But other parts of the theme could break. I cannot explain how the background works exactly as it’s a complex element. Please check these 2 files: http://screencast.com/t/SGcYeQGgJ and http://screencast.com/t/xg6iBeSliqlx
Thank you!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.