alanbrownca
Forum Replies Created
-
Sure thing, here is the full printout. I’m using Roots/Sage as a base for my theme.
Illuminate \ View \ ViewException (E_ERROR) simplexml_load_file(//localhost:3000/wp-content/uploads/2023/07/bnpl-icon-NS.svg): Failed to open stream: Connection refused (View: /opt/bitnami/wordpress/wp-content/themes/checkfront-2022/resources/views/partials/content-page.blade.php) (View: /opt/bitnami/wordpress/wp-content/themes/checkfront-2022/resources/views/partials/content-page.blade.php)
Thanks for the follow up. I do want to clarify that the issue produces a critical error, not a warning. When
WP_DEBUG
isfalse
, the page is not shown, but the following error is instead:There has been a critical error on this website.
This occurs when the Return Format of the Image Field in ACF is Image Array, and then an SVG selected from the Media Library with that field.
Hi @ghernkadence,
Yes, this issue does not exist on 3.0.41 but it does exist on 3.1.12, and 3.1.13.
I’ve narrowed the occurrence of this error down to the use of the Image Field in ACF when the Image Array format is returned and an SVG asset is selected from the Media Library.
I was adding the image to my custom block template in this manner.
I have found that by switching the Return Format in ACF to Image URL, this issue is avoided, presumably because the
fix_wp_get_attachment_image_svg
function is not called.I believe the issue to be around the use of
simplexml_load_file
, as this and thefile_get_contents
functions can return with Connection Refused errors even whenallow_url_fopen
is enabled in some configurations.Forum: Plugins
In reply to: [WP REST API Controller] ACF Images not returning correctlyHi @jpowersdev
Thanks for the follow up. At the end of the day I did get it working by using the very plugin you’ve linked to in your reply.
Might be a nice feature to see added to this plugin. Food for thought. Cheers
Thank you Kelly! This is precisely what I was after.
Kelly, thank you for your reply.
If I am making changes to the plugin code then it would be overwritten when the plugin updates. Is there a solution for this that can be implemented in my code?