Thank you so much for this. The help article didn’t work for me and I couldn’t figure out why. That one line saved me. Yes, definitely needs to be added.
Finally figured this out.
Somewhere in the beginning of the page, I was doing this to get the current blog’s name:
<?php $current_site = get_blog_details(); echo $current_site->blogname; ?>
That has always worked until I upgraded WP and ACF recently. Then all of the sudden, the issue of media not loading and blowing up the memory started happening.
I finally found that removing this one line fixed the whole page so I rewrote it to this and now everything works:
<?php global $blog_id; $current_blog_details = get_blog_details( array( 'blog_id' => $blog_id ) ); echo $current_blog_details->blogname; ?>
I was able to run the upgrade just how you suggested but my problem is persisting. I am using a repeater field and inside it, all my sub fields work except for those where I am using the image field to return a url. This used to work prior to 5.5 but now they break the page. The page just stops rendering once it gets to the url of the image.
For example, when viewing source for my page, it ends at
<a href="#module-logos"><img src="
Worked for me. Thanks!
Switched to Twenty Sixteen and deactivated all plugins but ACF and issue remains. How do I export my JSON file?
Same issue here. Using flexible content field with ability for user to select number of columns where each column editor will show its own WYSIWYG. In random columns, the media upload button is missing.
I’m getting the same error. “Cannot read property ‘body’ of undefined”
Makes sense and I’ll try this exact suggestion. Thanks!
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.