Home › Forums › General Issues › Issue with Oembed field
I’m using the oEmbed field in a flexible content format. In my local environment, everything works just fine.
<?php elseif (get_row_layout() == 'embed') :?>
<div class="embed-full">
<div class="embed-container">
<?php the_sub_field('embed_link'); ?>
</div>
<p><?php the_sub_field('caption'); ?></p>
</div>
However, now that I’m trying to post an embed link on a live site, it’s not working. When I paste the link in, I don’t get a preview. And on the front end, it just returns a link that says False. The HTML shows this:
<a href="http://false">false</a>
When I go back into the CPT, instead of displaying the URL I had written, it now also says False and in the preview it says false. (see images atttached)
Here’s an example (last item on the page): https://kellydmiller.com/portfolio/fanning-the-flame-2019/
Also, yes, I deactivated all plugins except for ACF and CPTUI without which, the CPT wouldn’t work at all. However, no, I didn’t switch to a generic theme, because I don’t know how to test this on there without the code I have written in my custom theme.
How was the data in the DB for this field moved from one site to the other?
I didn’t transfer any data from my local site to my current site. I uploaded the blank theme.
Did I understand your question correctly?
The field is returning false because there is no value in the database.
I chose to reinput all the values on the live site instead of transfering over my database. That still is incorrect?
My misunderstanding. I don’t know why it’s not working. The video seems to work if I type in the URL in my browser. And it works when I plugin that URL into one of my test sites.
Do you have any plugins running on the live site that are not running on the local site?
No, the plugin setup is exactly the same.
Specifically:
Assuming that the WP version are the same then then only thing left is some difference in the hosting environment. I am not aware of anything that should stop the oembed field from working.
It could also be a javascript error. Are you seeing any errors reported in console? And easy way to test scripts is to add define( 'SCRIPT_DEBUG', true );
to your functions php file and see if that clears up the issue. If it does then you likely have a corrupted minified script file, this can happen when using FTP to transfer large minified script files.
I don’t have any errors in the console. I’ll try testing the scripts and see what happens. Thanks.
You must be logged in to reply to this topic.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.