The Frontend Admin plugin appears to be causing inconsistent image filename handling in WordPress media management. When an image is uploaded through ACF fields in my custom post types, the plugin’s interaction with WordPress’s media handling system creates a discrepancy in how image filenames are processed. Specifically, when an image is uploaded and the post is saved, WordPress appends a numerical suffix (e.g., “-1”) to the resized versions of the image, but the reference to the original/base image in the srcset attribute remains without this suffix. This creates broken image references on mobile devices as the srcset attempts to load the non-suffixed version of the file which doesn’t exist.
This issue can be reproduced consistently by: uploading a new image through an ACF image field in the any post, saving the post, and then examining the generated HTML. The srcset attribute in the img tag shows all resized versions with a numerical suffix (e.g., “-1”), while the base image reference lacks this suffix. This inconsistency causes CDN distribution issues and results in broken images on certain devices depending on which version of the image is requested through the srcset.
When I disable Frontend Admin, the issue goes away instantly. I hate to point fingers but it certainly does seem on the surface that this plugin is at least somehow involved in this issue.
]]>Thanks!
]]>Example before: www.test.com/?ref=23
Example now: www.test.com/%20?ref=23
The %20 is a space. I have not changed anything in the CTX feed or in WooCommerce.
Many thanks in advance.
]]>Thanks for this really great plugin, I am testing it locally since yesterday and I think there is CSS glitch with the Prefix and Suffix in the Block.
It’s adding some margin on top of the Prefix or Suffix, and I really can’t see where it’s coming from.
Please note, I am not great with php and I still don’t have a clue how to insert code in templates, so my setup is very simple, as follow — not doing anything fancy:
I add a couple of Meta Fields in the WordPress post, nothing fancy, just at the bottom of the page, enabled from the Preferences > Panels > Custom Fields…
Than in the Gutenberg Query loop / Archives, I add a couple of Blocks and in Meta field settings > Field Type > I pick “Dynamic field”, then in Field Name I add the field name created in the post. So I use two Blocks, presented inline and Display Output is Inline block.
For now I could always add the css as shown below, but I thought you might like to now.
Also, very important, this is happening a bit randomly; for example, it might add the top margin in the first block’s Prefix or Suffix, and then the next block is fine… then if you play with the settings and resave and the second Block with have the margin added and the first one back to normal… so it’s a bit erratic.
Otherwise, I am so glad you created this plugin, I searched WordPress for the past two weeks for something like that, and yesterday only I persevered and decided to go through tons of pages through the search, it’s a shame because it deserves to be at the top of the search!
.wp-block-mfb-meta-field-block.is-display-inline-block .prefix+.value, .wp-block-mfb-meta-field-block.is-display-inline-block .value+.suffix {
margin-left: 0.5em;
margin-top: 0; /*0 or auto fixes it*/
}
IMPORTANT UPDATE:
Actually, the extra top margin is added to the css class “Value” and not prefix or suffix. But the glitch appears WHEN you add a prefix or suffix.
function addPriceSuffix($format, $currency_pos) {
switch ( $currency_pos ) {
case 'left' :
$currency = get_woocommerce_currency();
$format = '%1$s%2$s ' . $currency;
break;
}
return $format;
}
function addPriceSuffixAction() {
add_action('woocommerce_price_format', 'addPriceSuffix', 1, 2);
}
add_action('woocommerce_before_cart', 'addPriceSuffixAction');
add_action('woocommerce_review_order_before_order_total', 'addPriceSuffixAction');
I have used the above code to add USD to the cart and checkout pages on my site. I think the latest WC update broke this code.
How would I edit this code to have the USD suffix appear again on my cart and checkout pages only (it gets a little long/cluttered on catalog and product pages).
Thanks in advance and have a great day.
Regards,
Nushi
I’m wondering is there way to hide the price suffix if a customer have 0% TAX (based on their location). All of the products in the shop are taxable, but only for EU customers. I need to hide the price suffix because it looks confusing for non-EU clients.
Regars,
Nushi
]]>