Help with blue essence-plugin problem?
Started by
Guest_Sarah_*
, Sep 30 2010 11:14 AM
6 replies to this topic
#1 Guest_Sarah_*
Posted 30 September 2010 - 11:14 AM
Hi all-
I have had blue essense for years and loveit. Then suddently its notworking and im freaking out! I am losing business every second my website is down:(
Please let me know hopw to fix this!!
my website says this!
Catchable fatal error: Object of class WP_Error could not be converted to
string in
/hermes/web06b/b1064/moo.elitepetcare/wp-content/themes/blue_essence_261/plugins/iThemesFileUtility.php
on line 92
Then in the file it says this (below),can you please please tell me what i
can do to fix this? This is my business website and is super important to
me!
Thank you!
Sarah
<?php
/*
Copyright 2008 iThemes (email: <a title="This external link will open in a new window" href="http://email.fatcow.com/sqmail/src/compose.php?send_to=support@ithemes.com" rel="nofollow" target="_blank">support@ithemes.com</a>)
Written by Chris Jean
Version 1.0.2
Version History
1.0.1 - 2008-09-30
1.0.2 - 2008-10-03
1.0.3 - 2008-11-02
Fixed file path to url conversion issues
*/
if ( !class_exists( 'iThemesFileUtility' ) ) {
class iThemesFileUtility {
// Customized media_handle_upload() from 2.6.2 wp-admin/includes/media.php
function uploadFile( $file_id ) {
$overrides = array( 'test_form' => false );
$file = wp_handle_upload( $_FILES[$file_id], $overrides );
if ( isset( $file['error'] ) )
return new WP_Error( 'upload_error', $file['error'] );
$url = $file['url'];
$type = $file['type'];
$file = $file['file'];
$title = preg_replace( '/.[^.]+$/', '', basename( $file ) );
$content = '';
// use image exif/iptc data for title and caption defaults if possible
if ( $image_meta = @wp_read_image_metadata( $file ) ) {
if ( trim( $image_meta['title'] ) )
$title = $image_meta['title'];
if ( trim( $image_meta['caption'] ) )
$content = $image_meta['caption'];
}
// Construct the attachment array
$attachment = array(
'post_mime_type' => $type,
'guid' => $url,
'post_title' => $title,
'post_content' => $content
);
// Save the data
$id = wp_insert_attachment( $attachment, $file );
if ( !is_wp_error( $id ) ) {
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata(
$id, $file ) );
}
$data = array(
'id' => $id,
'url' => $url,
'type' => $type,
'file' => $file,
'title' => $title,
'caption' => $content
);
return $data;
}
// Wrapper for image_resize
// Created to provide better return variables
function resizeImage( $file, $max_w, $max_h, $crop = false, $suffix =
null, $dest_path = null, $jpeg_quality = 90 ) {
$uploads = wp_upload_dir();
if ( empty( $dest_path ) )
$dest_path = iThemesFileUtility::_getResizedImageFilePath( $file,
$max_w, $max_h, $crop, $suffix, $dest_path, $jpeg_quality );
$this->_pluginPath = dirname( __FILE__ );
$abspath = ABSPATH;
if ( preg_match( '/^[a-zA-Z]:/', $abspath ) )
$abspath = preg_replace( '|/$|', '\', $abspath );
$this->_pluginRelativePath = str_replace( $abspath, '',
$this->_pluginPath );
$this->_pluginURL = get_option( 'siteurl' ) . '/' . str_replace( '\',
'/', $this->_pluginRelativePath );
if ( file_exists( $dest_path ) ) {
if ( filemtime( $file ) > filemtime( $dest_path ) )
unlink( $dest_path );
else {
$abspath = ABSPATH;
if ( preg_match( '/^[a-zA-Z]:/', $abspath ) )
$abspath = preg_replace( '|/$|', '\', $abspath );
$url = get_option( 'siteurl' ) . '/' . str_replace( '\', '/',
str_replace( $abspath, '', $dest_path ) );
return array( 'file' => $dest_path, 'url' => $url );
}
}
$image = image_resize( $file, $max_w, $max_h, $crop, $suffix,
$dest_path, $jpeg_quality );
if ( is_wp_error( $image ) )
return $image;
$url = $uploads['url'] . '/' . basename( $image );
return array( 'file' => $image, 'url' => $url );
}
function _getResizedImageFilePath( $file, $max_w, $max_h, $crop = false,
$suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
require_once( ABSPATH . 'wp-admin/includes/image.php' );
$image = wp_load_image( $file );
if ( !is_resource( $image ) )
return new WP_Error( 'error_loading_image', $image );
list( $orig_w, $orig_h, $orig_type ) = getimagesize( $file );
$dims = image_resize_dimensions( $orig_w, $orig_h, $max_w, $max_h,
$crop );
if ( ! $dims )
return $file;
list( $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h )
= $dims;
$newimage = imagecreatetruecolor( $dst_w, $dst_h);
// preserve PNG transparency
if ( IMAGETYPE_PNG == $orig_type && function_exists(
'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
imagealphablending( $newimage, false);
imagesavealpha( $newimage, true);
}
imagecopyresampled( $newimage, $image, $dst_x, $dst_y, $src_x, $src_y,
$dst_w, $dst_h, $src_w, $src_h);
// we don't need the original in memory anymore
imagedestroy( $image );
// $suffix will be appended to the destination filename, just before
the extension
if ( !$suffix )
$suffix = "{$dst_w}x{$dst_h}";
$info = pathinfo($file);
$dir = $info['dirname'];
$ext = $info['extension'];
$name = basename($file, ".{$ext}");
if ( !is_null($dest_path) and $_dest_path = realpath($dest_path) )
$dir = $_dest_path;
$destfilename = "{$dir}/{$name}-{$suffix}.{$ext}";
return $destfilename;
}
}
}
?>
I have had blue essense for years and loveit. Then suddently its notworking and im freaking out! I am losing business every second my website is down:(
Please let me know hopw to fix this!!
my website says this!
Catchable fatal error: Object of class WP_Error could not be converted to
string in
/hermes/web06b/b1064/moo.elitepetcare/wp-content/themes/blue_essence_261/plugins/iThemesFileUtility.php
on line 92
Then in the file it says this (below),can you please please tell me what i
can do to fix this? This is my business website and is super important to
me!
Thank you!
Sarah
<?php
/*
Copyright 2008 iThemes (email: <a title="This external link will open in a new window" href="http://email.fatcow.com/sqmail/src/compose.php?send_to=support@ithemes.com" rel="nofollow" target="_blank">support@ithemes.com</a>)
Written by Chris Jean
Version 1.0.2
Version History
1.0.1 - 2008-09-30
1.0.2 - 2008-10-03
1.0.3 - 2008-11-02
Fixed file path to url conversion issues
*/
if ( !class_exists( 'iThemesFileUtility' ) ) {
class iThemesFileUtility {
// Customized media_handle_upload() from 2.6.2 wp-admin/includes/media.php
function uploadFile( $file_id ) {
$overrides = array( 'test_form' => false );
$file = wp_handle_upload( $_FILES[$file_id], $overrides );
if ( isset( $file['error'] ) )
return new WP_Error( 'upload_error', $file['error'] );
$url = $file['url'];
$type = $file['type'];
$file = $file['file'];
$title = preg_replace( '/.[^.]+$/', '', basename( $file ) );
$content = '';
// use image exif/iptc data for title and caption defaults if possible
if ( $image_meta = @wp_read_image_metadata( $file ) ) {
if ( trim( $image_meta['title'] ) )
$title = $image_meta['title'];
if ( trim( $image_meta['caption'] ) )
$content = $image_meta['caption'];
}
// Construct the attachment array
$attachment = array(
'post_mime_type' => $type,
'guid' => $url,
'post_title' => $title,
'post_content' => $content
);
// Save the data
$id = wp_insert_attachment( $attachment, $file );
if ( !is_wp_error( $id ) ) {
wp_update_attachment_metadata( $id, wp_generate_attachment_metadata(
$id, $file ) );
}
$data = array(
'id' => $id,
'url' => $url,
'type' => $type,
'file' => $file,
'title' => $title,
'caption' => $content
);
return $data;
}
// Wrapper for image_resize
// Created to provide better return variables
function resizeImage( $file, $max_w, $max_h, $crop = false, $suffix =
null, $dest_path = null, $jpeg_quality = 90 ) {
$uploads = wp_upload_dir();
if ( empty( $dest_path ) )
$dest_path = iThemesFileUtility::_getResizedImageFilePath( $file,
$max_w, $max_h, $crop, $suffix, $dest_path, $jpeg_quality );
$this->_pluginPath = dirname( __FILE__ );
$abspath = ABSPATH;
if ( preg_match( '/^[a-zA-Z]:/', $abspath ) )
$abspath = preg_replace( '|/$|', '\', $abspath );
$this->_pluginRelativePath = str_replace( $abspath, '',
$this->_pluginPath );
$this->_pluginURL = get_option( 'siteurl' ) . '/' . str_replace( '\',
'/', $this->_pluginRelativePath );
if ( file_exists( $dest_path ) ) {
if ( filemtime( $file ) > filemtime( $dest_path ) )
unlink( $dest_path );
else {
$abspath = ABSPATH;
if ( preg_match( '/^[a-zA-Z]:/', $abspath ) )
$abspath = preg_replace( '|/$|', '\', $abspath );
$url = get_option( 'siteurl' ) . '/' . str_replace( '\', '/',
str_replace( $abspath, '', $dest_path ) );
return array( 'file' => $dest_path, 'url' => $url );
}
}
$image = image_resize( $file, $max_w, $max_h, $crop, $suffix,
$dest_path, $jpeg_quality );
if ( is_wp_error( $image ) )
return $image;
$url = $uploads['url'] . '/' . basename( $image );
return array( 'file' => $image, 'url' => $url );
}
function _getResizedImageFilePath( $file, $max_w, $max_h, $crop = false,
$suffix = null, $dest_path = null, $jpeg_quality = 90 ) {
require_once( ABSPATH . 'wp-admin/includes/image.php' );
$image = wp_load_image( $file );
if ( !is_resource( $image ) )
return new WP_Error( 'error_loading_image', $image );
list( $orig_w, $orig_h, $orig_type ) = getimagesize( $file );
$dims = image_resize_dimensions( $orig_w, $orig_h, $max_w, $max_h,
$crop );
if ( ! $dims )
return $file;
list( $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h )
= $dims;
$newimage = imagecreatetruecolor( $dst_w, $dst_h);
// preserve PNG transparency
if ( IMAGETYPE_PNG == $orig_type && function_exists(
'imagealphablending' ) && function_exists( 'imagesavealpha' ) ) {
imagealphablending( $newimage, false);
imagesavealpha( $newimage, true);
}
imagecopyresampled( $newimage, $image, $dst_x, $dst_y, $src_x, $src_y,
$dst_w, $dst_h, $src_w, $src_h);
// we don't need the original in memory anymore
imagedestroy( $image );
// $suffix will be appended to the destination filename, just before
the extension
if ( !$suffix )
$suffix = "{$dst_w}x{$dst_h}";
$info = pathinfo($file);
$dir = $info['dirname'];
$ext = $info['extension'];
$name = basename($file, ".{$ext}");
if ( !is_null($dest_path) and $_dest_path = realpath($dest_path) )
$dir = $_dest_path;
$destfilename = "{$dir}/{$name}-{$suffix}.{$ext}";
return $destfilename;
}
}
}
?>
#6 Guest_Jerry Bates_*
Posted 03 April 2012 - 03:16 PM
I am having the same problem while working on a client site. Their site rozenhartchiro.com functions perfectly. Making a duplicate site on my dev server results in the Catchable Error in iThemesFileUtility.php on line 92.
How can I clear up this issue so that I can proceed with development. Is this theme tied to a particular URL (in this case my client's) or is there some other issue at work here. I have not changed the theme or edited it's fiels in any way, just packaged it on the live site, and uploaded it (along with their database) on my dev server.
Thanks,
Jerry
How can I clear up this issue so that I can proceed with development. Is this theme tied to a particular URL (in this case my client's) or is there some other issue at work here. I have not changed the theme or edited it's fiels in any way, just packaged it on the live site, and uploaded it (along with their database) on my dev server.
Thanks,
Jerry
#7
Posted 04 April 2012 - 04:46 PM
@all,
for support on Essence, please sign in with the username and password you use to access the membership area (from where you downloaded the product(s) you purchased), and post your support request in the Essence support forum: http://ithemes.com/forum/forum/36-essence/,
thanks,
Ronald
for support on Essence, please sign in with the username and password you use to access the membership area (from where you downloaded the product(s) you purchased), and post your support request in the Essence support forum: http://ithemes.com/forum/forum/36-essence/,
thanks,
Ronald
Join the iThemes Builder Community on Google+.
To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. Please also read the forum guidelines.
When asking your question/posting your request on the forum, please be as concise and specific as possible. The shorter your request, the more to the point, the more specific, the easier it will be for us to try and help out.
Reply to this Topic
ATTENTION
If this topic is marked RESOLVED or INFORMATION, or if you are NOT experiencing EXACTLY the same issue, please start a new topic to provide the details of your problem. If the solution provided doesn't work for you, you should start a new topic. If you feel this thread contains relevant information, you may include a link to it in your new topic. To ensure that we can process your support request efficiently, ALWAYS include a link to your site, and/or the page your request is related to. When posting your question or request on the forum, please be as concise and specific as possible. The shorter and more to the point you can make your request, the better.
For BackupBuddy related issues, be sure to include the status log from your most recent backup.
CLICK HERE to start a new topic in the Easy Theme and Plugin Upgrades Plugin forum.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users




