Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2007
    Location
    Texas, USA
    Posts
    1,400
    Plugin Contributions
    1

    red flag ISSUE IF: Products loaded through alternative ways or image files deleted

    If an image file is deleted while a product is live, or during manual entry the image file is manually put in incorrectly or a product is entered in a way other than the standard one at a time manual way and the product's image is not available.... THEN

    ZC will create an internal Request URI: /index.php?main_page=ImageDirectoryNameImageNameNoSpacesNoPeriods

    and will attempt to run alternative code found in:

    PHP Warning: require (includes/templates/template_default/templates/tpl_ImageDirectoryNameImageNameNoSpacesNoPeriods_default.php): failed to open stream: No such file or directory

    The cart appears to run okay except that the "no_picture.gif" is not shown but a messed up product spot that seems out of place is there....

    My cart knows that the image is missing from looking at the product. I don't know if this is because of the image missing mode but it seems if it is known that the image is missing maybe the "no_picture.gif" could be used as the image until the picture is added?

    Also, if during manual entry a image filename is given that does not exist maybe the cart should give a warning that this will mess the looks of the site up?

  2. #2
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: ISSUE IF: Products loaded through alternative ways or image files deleted

    I don't get any similar result. For one, not sure if the statement: ImageDirectoryNameImageNameNoPeriodsNoSpaces is the actual words or if that is to be representative of what happens to the original file path... in either case, there should not be any spaces in the filename anyways...

    As to the lack of use of the no_picture.gif, I'm not sure what is expected here, it is used if no picture is associated with a product. If there is an association, then there is an expectation that "after the visit" that there be somewhere to which to go...

    What I did was go to a test product that I had previously created. The product did not have an image associated with it. The catalog side displayed the no image image, easy..

    Then I assigned an image that I was highly certain didn't exist. I then loaded the product and reviewed that path name to find out that what was offered as the image path was what I had identified to be the image's path. I didn't have any unusual changes as described above in the OP.

    So, what other software is installed to the site in question? What about the template? I can't think of a time where anyone has described the problem suggested above so it seems to be a unique situation...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  3. #3
    Join Date
    Jun 2007
    Location
    Texas, USA
    Posts
    1,400
    Plugin Contributions
    1

    Default Re: ISSUE IF: Products loaded through alternative ways or image files deleted

    Quote Originally Posted by mc12345678 View Post
    I don't get any similar result. For one, not sure if the statement: ImageDirectoryNameImageNameNoPeriodsNoSpaces is the actual words or if that is to be representative of what happens to the original file path... in either case, there should not be any spaces in the filename anyways...

    As to the lack of use of the no_picture.gif, I'm not sure what is expected here, it is used if no picture is associated with a product. If there is an association, then there is an expectation that "after the visit" that there be somewhere to which to go...

    What I did was go to a test product that I had previously created. The product did not have an image associated with it. The catalog side displayed the no image image, easy..

    Then I assigned an image that I was highly certain didn't exist. I then loaded the product and reviewed that path name to find out that what was offered as the image path was what I had identified to be the image's path. I didn't have any unusual changes as described above in the OP.

    So, what other software is installed to the site in question? What about the template? I can't think of a time where anyone has described the problem suggested above so it seems to be a unique situation...

    Sorry MC12345678 .... it looks like it is a mod doing the strange code calling. However, if a bad image name is put in then the "no_picture.gif" is not shown but just a crazy looking link to the picture and according to the admin product page .... zen cart knows that the image is missing.... so if zc knows the image is missing then it would be great if it automatically put the "no_picture.gif" to keep the front end looking good?

    I understand that this is probably not reported much as it is easily fixed by putting a picture in.... however, until somebody finds the issue or somebody says something it will be show broken on the frontend.

    Thank you!

  4. #4
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: ISSUE IF: Products loaded through alternative ways or image files deleted

    Ultimately, that's why one or more plugins were developed to determine if there were any orphaned and/or missing images. It may be more than one plugin to accomplish it, but basically checking for the existence of every image while displaying a page in what is expected to be the rare occurrence of an image missing is expensive and slows down the system.

    To accomplish on the front end what appears possible on the back end would require either an additional database field that identifies a successful path to image match (updated on some "schedule") or a check against the fileserver either on each page load or at a pre-determined event...

    All kind of depends on how one uses/updates their store and level of knowledge/experience in doing so. Accidents will happen, but when the appropriate process/sequence is followed, there should be little reason to bog down the front end for a backend process.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: ISSUE IF: Products loaded through alternative ways or image files deleted

    As for deleted images? Well, while I haven't specifically recently read the guidance on locking down the server because the associated principles have been the same for years, one should secure the images once placed so that they can neither be deleted nor modified without altering the file/folder permissions. Sure doesn't specifically prevent database changes, but...
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  6. #6
    Join Date
    Jun 2007
    Location
    Texas, USA
    Posts
    1,400
    Plugin Contributions
    1

    Default Re: ISSUE IF: Products loaded through alternative ways or image files deleted

    Thank you makes sense. I understand it is a low priority. Have a great weekend!

 

 

Similar Threads

  1. how to prevent image from being deleted when a product is deleted?
    By denniszc in forum All Other Contributions/Addons
    Replies: 7
    Last Post: 7 Mar 2013, 03:01 PM
  2. What's wrong with my css files?? Aren't loaded on new server.
    By rdesignista in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 22 Aug 2012, 07:04 AM
  3. Products loaded through PHPMYADMIN
    By Nick1973 in forum General Questions
    Replies: 11
    Last Post: 15 Sep 2011, 05:41 PM
  4. 1.3.9e vs. 1.3.9d-- 3 files deleted
    By TonyBenedetti in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 30 Jul 2010, 12:58 PM
  5. Product Image - Alternative Image, and other questions
    By ncd in forum General Questions
    Replies: 9
    Last Post: 26 Jun 2007, 05:59 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR