Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
On your "test" server is it also setup to have a subdirectory within the HTTP_SERVER and secure version of the same?
I'm thinking that the code in the image_handler.php file which references using DIR_WS_CATALOG where in your case is setup as / but is acting like /xxxxxxxx/ is possibly causing this issue.
Might suggest modifying line say line 752 of image_handler.php for you from:
Code:
echo zen_image(DIR_WS_CATALOG . $preview_image, addslashes($pInfo->products_name), $width, $height) . '<br />';
To:
Code:
echo zen_image('/xxxxxx' . DIR_WS_CATALOG . $preview_image, addslashes($pInfo->products_name), $width, $height) . '<br />';
Where '/xxxxxx' is the "hidden" portion of your uri in the admin/includes/configure.php.
Might have a better solution later if that is successful. Preferably one that doesn't require any further editing.
On test site HTTP_SERVER is http url and HTTPS _SERVER is https.
Your suggested code change works - it displayed the thumbnail for the large image. I copied your suggestion into lines #727 and #737 which then produced the small and medium thumbnails as well. (Yay! Thank you!)
The strangeness in my HTTP and HTTP_SERVERs was to do with comodo SSL certificate on a shared hosting site. I previously used my store url in the config files and I kept getting a 'sort of' secure indication message- green but with lock icon unlocked, and I was unable to get the comodo seal displayed on my site. When I chased it down it turns out that with shared hosting I have to use the /host's specific server/my user name/ in place of /my store url in the config files.
I had done all that before doing the 1.5.5a andIH4 update and had entered new products in the store but hadn't added any new additional images via admin/tools/IH4
Thank you so much for your assistance.
Re: Image Handler 4 Support Thread
So have you tried though then putting your "username" at least in the admin in each of the DIR_WS_CATALOG defines such that instead of '/' they are '/xxx/'? (again kind of goes back to "which" is correct, either same DIR_WS_ paths for both HTTP_ and HTTPS_ or is there some other "fix". :) well, glad you got it working. :) good luck!
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
So have you tried though then putting your "username" at least in the admin in each of the DIR_WS_CATALOG defines such that instead of '/' they are '/xxx/'? (again kind of goes back to "which" is correct, either same DIR_WS_ paths for both HTTP_ and HTTPS_ or is there some other "fix". :) well, glad you got it working. :) good luck!
I just tried unsuccessfully - I replaced the original code in image_handler.php and changed the DIR_WS paths to '/username/' I also tried '/~username/' as that's what is in the HTTP and HTTPS_SERVER
The DIR_FS_CATALOG defines is '/home/username/public_html/' and in that case the username isn't preceded by a ~ Is that worth a try as DIR_WS path or is that an unrelated thing.
Not sure if this issue is strictly a 'people who use comodo ssl on a shared host who also use IH4' or if this might apply to other situations as well.
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
soxophoneplayer
...Not sure if this issue is strictly a 'people who use comodo ssl on a shared host who also use IH4' or if this might apply to other situations as well.
Oops. Just discovered that my main menu dropdowns and my featured/special main page tabs have been disabled and give a 404. I uninstalled IH4.4 github version and that issue resolved.
I reinstalled IH4.3.2 that I previously had been using. Menus etc ok. but missing images in admin/tools/IH manager returned. (Making me think this is zc 1.5.5a interaction related as I didn't see this problem in zc1.5.5 with IH4.3.2)
The hack from post #1492 solved the SSL shared hosting file issue as it has in IH4.4
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
soxophoneplayer
I just tried unsuccessfully - I replaced the original code in image_handler.php and changed the DIR_WS paths to '/username/' I also tried '/~username/' as that's what is in the HTTP and HTTPS_SERVER
The DIR_FS_CATALOG defines is '/home/username/public_html/' and in that case the username isn't preceded by a ~ Is that worth a try as DIR_WS path or is that an unrelated thing.
Not sure if this issue is strictly a 'people who use comodo ssl on a shared host who also use IH4' or if this might apply to other situations as well.
Day late, dollar short, but the expectation would have been that the DIR_WS_CATALOG and secure version of same would have had your ~username in it and your HTTP_SERVER (and secure) would have had that removed leaving just the host name with no ending slash.
It's not specifically a comodo shared certificate issue. It's how your host has chosen to "share" their certificate. Some keep with just a hostname but subdomain with no suffix "folder". Anyways, thinking that the right answer to the above issue is to simply use the full url to the image(s) with the appropriately identified https: or http: based on the current page's "state".
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
Day late, dollar short...
I aspire to, someday, be only a dollar and only a day short ;o)
Re: Image Handler 4 Support Thread
*SOMEWHERE*... Somewhere (and I obviously can't find it after much time searching) I read that you should install Image Handler after you install your template. However, I am in the process of giving my website a complete facelift. I may decide change templates as I play around with things.
Are there many affecting template files? Can I simply copy them to new template folder when/if I change templates? I'm assuming those IH_INSTALL folders denote what will become template folders after the installer has its way, but I would like verification before I plow ahead.
Thanks for your time!
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
Three Sisters
*SOMEWHERE*... Somewhere (and I obviously can't find it after much time searching) I read that you should install Image Handler after you install your template. However, I am in the process of giving my website a complete facelift. I may decide change templates as I play around with things.
Are there many affecting template files? Can I simply copy them to new template folder when/if I change templates? I'm assuming those IH_INSTALL folders denote what will become template folders after the installer has its way, but I would like verification before I plow ahead.
Thanks for your time!
If you take a breath and read the installation instructions you will basically see what it is you are searching. The instructions advise that when working with a template to merge the modifications made to support IH4 with those of the equivalent template file. Thus to do so means that the template must be there to which to merge the files.
Further, it is generally recommended to install the desired template as the "first" thing after installing ZC, so that such template modifying code and changes can be placed in sensible locations and not haphazardly operate. Blindly copying template files from one template directory to another may produce undesirable results.
Yes the IH_INSTALL folder in each applicable location relates to the override/modification that the installer is to address. I haven't dug into the 1.5.5 version of the installer, but at one point if the associated template override directory didn't exist then the install would not complete, so that is something with which to possibly have to deal.
Re: Image Handler 4 Support Thread
Quote:
Originally Posted by
mc12345678
If you take a breath and read the installation instructions you will basically see what it is you are searching....
Further, it is generally recommended to install the desired template as the "first" thing after installing ZC, so that such template modifying code and changes can be placed in sensible locations and not haphazardly operate. Blindly copying template files from one template directory to another may produce undesirable results.
Thank you, very much, for your reply. Sincerely, I DID read and re-read the instructions. I had successfully installed a template and Image Handler. But then, I decided to scrap the template. Since I wasn't very far along, I decided to start all over again because I didn't know what direction to take the template issue in relationship to IH. I just needed the reasoning behind what I had remembered reading.
Actually, I think your second paragraph is the real crux of the issue at hand. Thanks for setting my thought process in order. :)
Re: Image Handler 4 Support Thread
hi,
i will admit i am a little late to the image handler party. that said, since i have installed this add-on, i think it's awesome.
now to a small problem i have encountered and i am curious if any one else has this same issue. i am running v155 and IH v4.0 for v1.5.x. and frankly i'm not sure if its related to the image handler and the BMZ cache or part of the base ZC code, but i thought i would present it here. here is the situation:
- product 1 has an image associated with it called image1.jpg
- i now want to change the image for product 1. i have a new image file with the same name of image1.jpg
- i edit the product and select my new image file with the same name. it successfully gets uploaded to my site.
- image1_MED.jpg and image1_LRG.jpg do NOT get deleted. so now those image files remain for the old image.
i have now modified the code in /admin/includes/modules/product/update_product.php to delete those files.
Code:
if ($new_image == 'true') {
$src = DIR_FS_CATALOG . DIR_WS_IMAGES . zen_get_products_image((int)$products_id);
$filename_small = $src;
preg_match("/.*\/(.*)\.(\w*)$/", $src, $fname);
$products_image = zen_get_products_image((int)$products_id);
$products_image_extention = substr($products_image, strrpos($products_image, '.'));
$products_image_base = preg_replace('*' . $products_image_extention . '*', '', $products_image);
$filename_medium = DIR_FS_CATALOG . DIR_WS_IMAGES . 'medium/' . $products_image_base . IMAGE_SUFFIX_MEDIUM . '.' . $fname[2];
$filename_large = DIR_FS_CATALOG . DIR_WS_IMAGES . 'large/' . $products_image_base . IMAGE_SUFFIX_LARGE . '.' . $fname[2];
if (file_exists($filename_large)) {
unlink($filename_large);
}
if (file_exists($filename_medium)) {
unlink($filename_medium);
}
}
and frankly, i'm curious if someone else has experienced this problem; or if i did not install this plug-in correctly; or if by deleting those old files at this time, i am bypassing any of the benefits associated with this plugin.
thanks in advance!