I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified.
Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements.
Your upcoming reply will be treated with confidentiality and will only be visible to you and me.
✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup.
I've checked and I can see the issue you had there. Looks like the media translation plugin is causing issues with the SVG file as it seemed to work when I deactivated it.
I will forward this to a 2nd Tier Support for further assistance.
Yes, that is correct. You need to modify the SVG Support plugin file every time it updates. We've contacted the plugin author and we will follow up. Hopefully, we can have this changes permanently applied to that plugin.
Absolutely, we're on it. If the ticket happens to be closed in the meantime, no need to be concerned. We'll ensure to keep you posted once we have any feedback to share.
The matter you're encountering is a recognized issue linked to the SVG support plugin. Our 2nd Tier Support has already contacted the author of the plugin to address this concern.
For the time being, I suggest implementing the following PHP code into your theme's functions.php file. You can place it at the end of the code. If you're uncertain about this process, please inform me, and I'll be glad to apply the workaround on your behalf.
// WPML Workaround for compsupp-6933
add_filter('wp_get_attachment_metadata', 'wpml_compsupp6933_fix_attachment_metadata_file_path', 10, 2);
function wpml_compsupp6933_fix_attachment_metadata_file_path($data, $attachment_id) {
// Only apply the workaround if WPML Media and SVG Support plugins are active
if( class_exists('WPML_Media') && function_exists('bodhi_svgs_generate_svg_attachment_metadata') ) {
if (isset($data['file']) && !preg_match('/\d{4}\/\d{2}\//', $data['file'])) {
// Get the upload directory info
$upload_dir_info = wp_upload_dir();
// Extract the year and month from the basedir
$year_month = date('Y/m', strtotime(get_post_field('post_date', $attachment_id)));
// Prepend the year and month to the file
$data['file'] = $year_month . '/' . $data['file'];
}
}
return $data;
}
I have an update from our second-tier support and they mentioned that the issue is fixed by the plugin author. Please update the SVG Support plugin to the latest version and retry.
The topic ‘[Closed] svg broken in widgets’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.