The customer created a custom post field for images but was unable to upload AVIF format files to the field, despite AVIF images being supported elsewhere in their WordPress media library. They requested a solution to enable AVIF uploads in Toolset's custom image field.
Solution:
A code snippet was provided to extend the valid image file types for Toolset, allowing AVIF images. The customer added this code to their theme’s functions.php file or within Toolset > Settings >
function allow_avif_in_toolset( $valid_extensions ) {
// Add AVIF to the list of valid extensions
$valid_extensions[] = 'avif';
return $valid_extensions;
}
add_filter( 'toolset_valid_image_extentions', 'allow_avif_in_toolset' );
This code successfully enabled the AVIF format in the custom image field, allowing the customer to upload AVIF images as intended.
I am encountering a 502 error when viewing translated event category archives using WPML. The error occurs even after trying default themes and disabling most plugins. The issue only affects translated event categories.
Solution:
After deactivating all plugins except WPML and Toolset, the 502 error disappears. This suggests that one of the other plugins is causing the issue. You should reactivate plugins one by one to identify the problematic plugin. In this case, deactivating the EWWW and Iubenda plugins resolved the issue. These plugins likely cause a conflict, possibly due to JavaScript errors. Consider using alternatives or reaching out to the plugin developers for support.