Repository navigation
Description
Has anyone ran across this issue? I'm not terribly familiar with this type of issue and was hoping there was an easy fix. I've been through the gambit trying to find a freaking plugin that can assist in giving my Google Bucket access to my damn media. After a lot of unsuccessful tries, cloudinary seems it may be my answer. But failure to launch occurred when activating the plugin and punching in the required information.
=============================================================
When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.8.2
Current theme: CSO Child Theme (version 1.0.0) Astra Theme v.3.6.3
Current plugin: Cloudinary (version 3.0.0)
PHP version 8.0.13
=============================================================
Line 433 Function:
/**
* Is the media item size allowed to be uploaded.
* Checks against the account limits.
*
* @param int $attachment_id The attachment ID.
*
* @return bool
*/
public function is_oversize_media( $attachment_id ) {
static $is_oversize = array();
if ( isset( $is_oversize[ $attachment_id ] ) ) {
return $is_oversize[ $attachment_id ];
}
$file_size = $this->get_attachment_file_size( $attachment_id );
$max_size = ( wp_attachment_is_image( $attachment_id ) ? 'image_max_size_bytes' : 'video_max_size_bytes' );
$limit = $this->plugin->components['connect']->usage['media_limits'][ $max_size ];
$is_oversize[ $attachment_id ] = $file_size > $limit;
if ( $is_oversize[ $attachment_id ] ) {
$max_size = ( wp_attachment_is_image( $attachment_id ) ? 'image_max_size_bytes' : 'video_max_size_bytes' );
$max_size_hr = size_format( $this->plugin->components['connect']->usage['media_limits'][ $max_size ] );
// translators: variable is file size.
$message = sprintf( __( 'File size exceeds the maximum of %s. This media asset will be served from WordPress.', 'cloudinary' ), $max_size_hr );
update_post_meta( $attachment_id, Sync::META_KEYS['sync_error'], $message );
}
return $is_oversize[ $attachment_id ];
}
=============
Error Details
An error of type E_ERROR was caused in line 433 of the file wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-media.php. Error message: Uncaught TypeError: Cannot access offset of type string on string in wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-media.php:433
Stack trace:
#0 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-sync.php(1209): Cloudinary\Media->is_oversize_media('805')
#1 [internal function]: Cloudinary\Sync->generate_file_signature('805')
#2 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-sync.php(705): call_user_func(Array, '805')
#3 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-sync.php(755): Cloudinary\Sync->generate_type_signature('file', '805')
#4 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-sync.php(281): Cloudinary\Sync->sync_base('805')
#5 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-sync.php(805): Cloudinary\Sync->generate_signature('805', true)
#6 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-sync.php(783): Cloudinary\Sync->get_sync_type('805')
#7 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-media.php(1554): Cloudinary\Sync->maybe_prepare_sync('805')
#8 wp-content/plugins/cloudinary-image-management-and-manipulation-in-the-cloud-cdn1/php/class-media.php(1606): Cloudinary\Media->cloudinary_id('805')
#9 wp-includes/class-wp-hook.php(303): Cloudinary\Media->filter_downsize(false, '805', 'full')
#10 wp-includes/plugin.php(189): WP_Hook->apply_filters(false, Array)
#11 wp-includes/media.php(207): apply_filters('image_downsize', false, '805', 'full')
#12 wp-includes/media.php(953): image_downsize('805', 'full')
#13 wp-includes/media.php(1131): wp_get_attachment_image_src('805', 'full', false)
#14 wp-includes/general-template.php(936): wp_get_attachment_image_url('805', 'full')
#15 wp-includes/general-template.php(977): get_site_icon_url(512, '', 0)
#16 wp-includes/general-template.php(3223): has_site_icon()
#17 wp-includes/class-wp-hook.php(303): wp_site_icon('')
#18 wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array)
#19 wp-includes/plugin.php(470): WP_Hook->do_action(Array)
#20 wp-admin/admin-header.php(147): do_action('admin_head')
#21 wp-admin/plugins.php(603): require_once('/home/test/...')
#22 {main}
thrown
Activity
wissam-khalili commentedon Dec 12, 2021
Hi @jssellars,
Could you please create a ticket to support@cloudinary.com with the system report attached as explained here?
In case it will be necessary, will you be willing to provide us with temporary access to a sandbox environment of your site where we can take a look and debug if needed?
Thanks,
Wissam
jssellars commentedon Dec 12, 2021
Not sure if I can do sandboxed, but since it's a dev environment, there is nothing critical at the moment. It's just critical I get this fixed! :) Anyway, headed over to make the ticket.