Section Video Background not working

Hi, I would like one of my sections to have a video background but the video is not displaying, and just shows a background colour. I have the latest version XVersion: 7.0.4

I can provide login details if required.

Hi @nourozi,

Thank you for reaching out to us. I checked your site and it looks like you’re trying to display a YouTube video in a section’s background video. YouTube videos cannot be set as section’s background video, please use a direct video URL for example http://example.com/a.mp4

You can self host a video and use it’s URL in the VIdeo Source field. Let us know how this goes!

Hi Nabeel, I am already using a self hosted video (http://erfolio.com/wp-content/uploads/2019/10/Black-13495.mp4) at the top of this page http://erfolio.com/

but it is only showing a black background.

Hello @nourozi,

I can see that you are using a Classic Section. Please create a new section and use the new Section element. You will have more controls over this new section element. And by the way, please go to X > Settings > Permissions > User Preferences and set the “Advanced Mode” to Always ON first so that all of the background options for the new section element will be displayed.

Once you are seeing the background options in the new section, insert the video url in the background lower layer option.

Hope this helps. Please let us know how it goes.

Hi, I have done as instructed but the video is still not playing. There should be a video playing behind the accordians I have placed in the top row on the page.

Hi @nourozi,

I checked the front end of the website and it should work. The only point that I see is that you need to disable the Upper Layer background and use the Lower layer background to add the video.

I suggest that you add another section and follow the steps mentioned below:

kindly get back to us with the result of the steps above and URL/User/Pass of your WordPress dashboard using the Secure Note functionality of the post to follow up the case if you still have problems.

Thank you.

Hi, I have unsuccessfully tried to fix it. Can you please login and let me know what the issue is? Thanks.

Hi @nourozi,

Thank you for the credentials, I did every test I could, unfortunately, I was not able to track what is causing the issue. I tried to import the very own page that has the issue on my dev site and the background video works there, both on classic and new sections.

My assumption is this issue might have something to do with your server configuration. I suggest you please get in touch with the hosting provider and update PHP to the supported version (try PHP 7.3) to avoid any conflict and incompatibility issues. PHP 5.6.40 (curretly you have) is no longer supported.

Let us know how it goes,
Cheers!

Hi I have changed the server to PHP 7.3 and still no result.

This did not work, what can I do now?

Hey @nourozi,

The cause of the issue could be coming from your WordPress Encoding Setup and/or your database charset setup. What’s happening is, double quotes are converted to its HTML entity equivalent in your database. HTML entities are not accepted in JSON which is what the element options use as data format. That is why you see the errors in the console.

Here’s the output in your site.

Here’s what it should be.

Please contact your web host as they maybe have some idea why double quotes are converted to the HTML entity equivalent.

Also, would you mind giving us cPanel access so we could take a look at your WordPress and database setup. Just note though that we could not guarantee that we can fix the issue as this is beyond our product’s control.

If you can, I’d recommend rebuilding your site using a fresh WordPress install and a new web host.

Thanks.

The Server charset: UTF-8 Unicode (utf8) is being used.

Hi @nourozi,

Database encoding is okay, I have investigated further and the issue is caused by this code block

function wp_kses_named_entities( $matches ) {
	global $allowedentitynames;

	if ( empty( $matches[1] ) ) {
		return '';
	}

	$i = $matches[1];
	return ( ! in_array( $i, $allowedentitynames ) ) ? "&$i;" : "&$i;";
}

It’s from public_html/wp-includes/kses.php. And the "&$i;" : "&$i;"; is probably the culprit since the standard " becomes &quot (eg. &$i;) .

The theme and builder doesn’t use wp_kses_named_entities(), hence it’s not a theme or plugin issue.

Then I found out that you have added this line to your wp-config.php, and apparently, this is the culprit.

define( 'CUSTOM_TAGS', true );

I went ahead and removed it, the backgrounds are now working. You have declared a custom tags, but you didn’t add any tags at all. Please check this for proper usage if you’re planning to continue using it. https://code.tutsplus.com/articles/new-wp-config-tweaks-you-probably-dont-know--wp-35396 (under 8. Redefining Allowed HTML Tags From Scratch With CUSTOM_TAGS)

Thanks!

Great, thanks for the awesome support! Got there in the end :slight_smile:

You’re welcome!
We’re glad @Rad were able to help you out.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.