Jackal1983 Posted November 26, 2012 Share Posted November 26, 2012 Hi Guys Im wanting to upload folders with pictures in to my images/source file to keep everything organised.. Which it will do without an issue using FTP. The issue i have is when i do this and then go into my admin part of the site to choose a picture for a product... it displays the folders but will not display the images in the folder... it loads but then displays an open folder icon... but does not show anything else... Anyone else got any ideas... Im just wanting to keep my pictures organsised! Kind Regards Jack Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted November 26, 2012 Share Posted November 26, 2012 Did you click on the Update File List tab on Admin/Images to hopefully rebuild the Filemanager, and did you Rebuild the images from Maintenance? Quote Link to comment Share on other sites More sharing options...
Jackal1983 Posted November 26, 2012 Author Share Posted November 26, 2012 Yep still nothing...Im using PNG file format does that make a diffrence??? Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 26, 2012 Share Posted November 26, 2012 Maintenance, Rebuild, Clear Image cache is probably not what is wanted. Image Filemanager, Update File List will put the new images into the CC_filemanager table (and take care of a few other things). Then, when in Add/Edit Product, Images tab, I see all the new images, but I can't get into the subfolder. PNG is a valid image suffix. You said: "it loads but then displays an open folder icon... but does not show anything else." I can't even get it to do that. Oh, wait. I see how it works now. You don't click on the folder icon - you click on the name of the subfolder. Which should then cause an expanding list similar to the category list on the storefront. And that is javascript-powered. So let me look at the javascript. There is also this: <script type="text/javascript">var file_list = []; var file_default = 0;</script> which isn't getting populated. Quote Link to comment Share on other sites More sharing options...
Jackal1983 Posted November 26, 2012 Author Share Posted November 26, 2012 Ive tryed that buddy. when in Add/Edit Product, Images tab, I see all the new images, but I can't get into the subfolder that are uploaded. When i click the folder name.. i get a grapic on the folder thats spinning but does not seem to expand the folder .. Folder grapic does change to open tho. I was expecting something like the storefront.... Very Odd really. Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 26, 2012 Share Posted November 26, 2012 Ok, I found the problem. I see that you are running on a Microsoft server (and thank you for mentioning that). I'll have a fix shortly. Quote Link to comment Share on other sites More sharing options...
Jackal1983 Posted November 26, 2012 Author Share Posted November 26, 2012 thankyou! Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 26, 2012 Share Posted November 26, 2012 This is a fix that will work for any operating system that understands both the forward- and back-slashes as directory separators. Unfortunately for the programming world, Windows' use of the backslash as a directory path separator also means that (maddeningly) extra care must be taken when getting lists from the operating system. The backslash is also used to 'escape' the following character. When whatever is processing strings with an escape character, such as sending strings into a database, the whatever will remove the backslash and do what it will with the following character. In order to prevent that, CC5 runs strings through a slash-stripper. Well, guess what! The subfolders that images are in will cause a directory path to be derived that ends in a trailing backslash - which will be stripped. One of the housekeeping duties of the (re)building of the Image Database function is to scan for table records that have references to images that don't exist. Well, without that trailing backslash, the calculated path/name of the image is such that there will not exist an image by that name. So CC5 deletes the table record. Ooops!! One redeeming factor in Windows' favor is that the operating system can use the forward slash as the directory path separator. So we will cause the path of the image to use forward slashes instead of the character identified by CC5 as the normal directory separator. In the file /classes/filemanager.class.php, find the function buildDatabase() (at around line 170). About 25 lines down, find this:$filepath_record = $this->formatPath(str_replace($this->_manage_root, '', dirname($file))); $filepath_record = empty($filepath_record) ? 'NULL' : $filepath_record; After those lines, add this:$filepath_record = str_replace(chr(92),"/",$filepath_record); I have not made a complete analysis of what consequences this may have on areas of the Cubecart code that are outside the direct areas of this complaint. That's Devellion's job. That said, be majorly observant of any anomalies as regards the display of images at any point in CubeCart. Again, this fix should not affect any operating that uses a forward-slash as the directory path separator, and fixes the issue caused by an operating system that defaults to using a backslash as the directory path separator (but will not fix any issue caused by an operating system that cannot use a forward-slash - but I don't know of one that does this). Personal Note: If you want to get your Juice on, get the album SkyWorld from Two Steps From Hell. If your stereo system has a volume control that only goes to 10, get a magic-marker, add 11, and crank that puppy! Quote Link to comment Share on other sites More sharing options...
Jackal1983 Posted November 27, 2012 Author Share Posted November 27, 2012 Hi Bsmither, Ive done this and it works a treat... Had a look around and the only thing i can see. Which i dont think is an issue. As your navigating the website it shows the whole webaddress including the server addy. Have a look http://www.millpondmodels.co.uk Thankyou very much for your help!! Jack Quote Link to comment Share on other sites More sharing options...
bsmither Posted November 27, 2012 Share Posted November 27, 2012 "As your navigating the website it shows the whole webaddress including the server addy." Sorry, I don't understand what this means. Would you please describe exactly what you see that concerns you, where exactly you see it, and why it seems to be a concern. Quote Link to comment Share on other sites More sharing options...
Jackal1983 Posted December 6, 2012 Author Share Posted December 6, 2012 this is resolved! thankyou Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.