-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show Avia codeblock and other Javascript-dependent post content #9
Comments
This might be a little related: https://jakearchibald.com/2016/link-in-body/ |
Working with WP core to explore more general fixes: https://core.trac.wordpress.org/ticket/46379 |
Idea: once the page is loaded, remove all callbacks from |
More discussion on unbinding callbacks from document.ready: https://stackoverflow.com/questions/7814408/clearing-a-jquery-document-ready-call |
good news everyone! It turns out if you load Javascript after the |
Avia is a premium theme, and so it doesn't seem fair to be giving free support for it. But generally this issue is still valid. |
On furniturebank.org, they use Avia codeblocks on some pages, which work fine on the web view, but just look like a shortcode in the printout. Eg https://www.furniturebank.org/8049-2/ looks fine, but in the printout for the site, that page has the content
[avia_codeblock_placeholder uid="0"]
in it.That's what's in the REST API response from http://www.furniturebank.org/wp-json/wp/v2/pages/3239, ie
I was suspicious it was just because there was related Javascript which wasn't getting loaded, but I don't think that's the whole story. When I load the page without javascript, the pretty donation form isn't there, but nor is that shortcode. So there's something more going on here than just missing Javascript, but that's certainly a big part of it.
I suspect this issue goes beyond just Avia, it probably affects any blocks or shortcodes that depend on JS or CSS.
Ideally, the WP REST responses would include what JS and CSS are needed to display them properly, so the JS could include them dynamically. It sounds like something similar happened on WordPress/gutenberg#9734 and https://core.trac.wordpress.org/ticket/46138
The text was updated successfully, but these errors were encountered: