PJ2006 Posted June 14, 2007 Share Posted June 14, 2007 I was showing someone the shop today on another computer - when I edited the category details - and saved, the image disappeared, does anyone know why this is. I'm a bit concerned as I thought I could edit it from anywhere. Link to comment Share on other sites More sharing options...
PJ2006 Posted June 14, 2007 Author Share Posted June 14, 2007 I was showing someone the shop today on another computer - when I edited the category details - and saved, the image disappeared, does anyone know why this is. I'm a bit concerned as I thought I could edit it from anywhere. I've now tried from my home PC and have the same problem, if I edit a category or sub-category, the image disappears on save. Please, please, please can someone help me Link to comment Share on other sites More sharing options...
germ Posted June 15, 2007 Share Posted June 15, 2007 Look in your /admin/includes/configure.php file. What do the lines in there (similar to these) say: define('DIR_WS_CATALOG_IMAGES', '/images/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_DOCUMENT_ROOT . 'images/'); :unsure: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
PJ2006 Posted June 15, 2007 Author Share Posted June 15, 2007 Look in your /admin/includes/configure.php file. What do the lines in there (similar to these) say: :unsure: define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); So slightly different to yours, is this the problem? How should i ammend this - just replace with what you have? Many thanks Link to comment Share on other sites More sharing options...
germ Posted June 15, 2007 Share Posted June 15, 2007 Here's where it gets a bit more complicated. If you go to your website, and start looking at the catalog, find an image that doesn't show up. It'll be just a red X <right-click> on that image and choose "Properties" In the dialogue box that appears, look in the "Address (URL):" space. It will probably either be either: http://www.yoursite.com/images/ http://www.yoursite.com/catalog/images/ Then, you need to look in the folders on your site, and see where the images that don't show up are really located at. Let me know where they are actually at. If you don't want the URL of your site to be "public" yet, just replace the site name with "xyz.com" in anything you post. By the way, our site suddenly developed the same problem and I had to change that one line that doesn't match yours to fix the problem. If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
PJ2006 Posted June 16, 2007 Author Share Posted June 16, 2007 Here's where it gets a bit more complicated. If you go to your website, and start looking at the catalog, find an image that doesn't show up. It'll be just a red X <right-click> on that image and choose "Properties" In the dialogue box that appears, look in the "Address (URL):" space. It will probably either be either: http://www.yoursite.com/images/ http://www.yoursite.com/catalog/images/ Then, you need to look in the folders on your site, and see where the images that don't show up are really located at. Let me know where they are actually at. If you don't want the URL of your site to be "public" yet, just replace the site name with "xyz.com" in anything you post. By the way, our site suddenly developed the same problem and I had to change that one line that doesn't match yours to fix the problem. Hi Jim, URL is http://www.mysite.co.uk/catalog/images/ But the image still really is in catalog/images according to my ftp client - /public_html/catalog/images Where would I be without you, thanks for sticking with me! Link to comment Share on other sites More sharing options...
germ Posted June 16, 2007 Share Posted June 16, 2007 Hi Jim, URL is http://www.mysite.co.uk/catalog/images/ But the image still really is in catalog/images according to my ftp client - /public_html/catalog/images Where would I be without you, thanks for sticking with me! :rolleyes: Just trying to help, Ma'am. :blush: You said the URL is: http://www.mysite.co.uk/catalog/images/ Is there not an image file name at the end? :unsure: Like: http://www.mysite.co.uk/catalog/images/welcome.jpg <-- NOTE THE FILE NAME AT THE END If the image URL just stops at /images/, and has no actual image file name, that is your problem. Can you verify that is what is happening? :unsure: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
PJ2006 Posted June 16, 2007 Author Share Posted June 16, 2007 :rolleyes: Just trying to help, Ma'am. :blush: You said the URL is: http://www.mysite.co.uk/catalog/images/ Is there not an image file name at the end? :unsure: Like: http://www.mysite.co.uk/catalog/images/welcome.jpg <-- NOTE THE FILE NAME AT THE END If the image URL just stops at /images/, and has no actual image file name, that is your problem. Can you verify that is what is happening? :unsure: sorry extended the properties box and sure enough the .jpg name was there. Good try though!!!! :thumbsup: Link to comment Share on other sites More sharing options...
germ Posted June 17, 2007 Share Posted June 17, 2007 Let me get this straight..... The URL to the image name says "/catalog/images", and you've looked in that folder on your web site, and that's where the image files are, yet they still don't show up on the web pages? :unsure: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
PJ2006 Posted June 17, 2007 Author Share Posted June 17, 2007 Let me get this straight..... The URL to the image name says "/catalog/images", and you've looked in that folder on your web site, and that's where the image files are, yet they still don't show up on the web pages? :unsure: yep, I know weird isn't it! It only happens when I edit a category. I'm going to try your change right now and see if that resolved it. Link to comment Share on other sites More sharing options...
PJ2006 Posted June 17, 2007 Author Share Posted June 17, 2007 yep, I know weird isn't it! It only happens when I edit a category. I'm going to try your change right now and see if that resolved it. Nope, didn't make any difference, if I open up a category or subcategory from the Admin screen and simply press Save, my image vanishes still. This is so frustrating!!!! Link to comment Share on other sites More sharing options...
germ Posted June 17, 2007 Share Posted June 17, 2007 I don't know what to say, Ma'am. Does the image disappear when viewing the catalog via the index.php in the root folder of your site? :unsure: I saw you had another thread on the same subject, and someone said it may be a bug in the software? <_< If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
PJ2006 Posted June 21, 2007 Author Share Posted June 21, 2007 I don't know what to say, Ma'am. Does the image disappear when viewing the catalog via the index.php in the root folder of your site? :unsure: I saw you had another thread on the same subject, and someone said it may be a bug in the software? <_< Hi Jim, Yes I did post elsewhere - but surely if it's a bug n the product everyone would be having this problem wouldn't they? No one else has reported it or mentioned they have the same problem. The image only disappears, when I have created the category, then go back and edit it - on save the image vanishes and I have to upload it each time. The problem is I'm doing the site for a friend and there are a couple of them wanting to edit the site and they don't have duplicate images. Link to comment Share on other sites More sharing options...
PJ2006 Posted July 6, 2007 Author Share Posted July 6, 2007 Hi Jim, Yes I did post elsewhere - but surely if it's a bug n the product everyone would be having this problem wouldn't they? No one else has reported it or mentioned they have the same problem. The image only disappears, when I have created the category, then go back and edit it - on save the image vanishes and I have to upload it each time. The problem is I'm doing the site for a friend and there are a couple of them wanting to edit the site and they don't have duplicate images. The solution to this problem follows: In catelog/admin/categories.php find the line :- if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } and replace it with :- if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { if (!is_null($categories_image->filename)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } Link to comment Share on other sites More sharing options...
germ Posted July 6, 2007 Share Posted July 6, 2007 Just for the record, and to anyone who may want to give this a try.... Replace: if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } With: if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { if (!is_null($categories_image->filename)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } } Since you introduced a new "{", you'll need a corresponding "}" or you'll get a "Parse error". :thumbsup: If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you. "Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice." - Me - "Headers already sent" - The definitive help "Cannot redeclare ..." - How to find/fix it SSL Implementation Help Like this post? "Like" it again over there > Link to comment Share on other sites More sharing options...
PJ2006 Posted July 6, 2007 Author Share Posted July 6, 2007 Just for the record, and to anyone who may want to give this a try.... Replace: if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } With: if ($categories_image = new upload('categories_image', DIR_FS_CATALOG_IMAGES)) { if (!is_null($categories_image->filename)) { tep_db_query("update " . TABLE_CATEGORIES . " set categories_image = '" . tep_db_input($categories_image->filename) . "' where categories_id = '" . (int)$categories_id . "'"); } } Since you introduced a new "{", you'll need a corresponding "}" or you'll get a "Parse error". :thumbsup: Thanks Jim sorry for that error, thanks for picking it up :blush: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.