Orphaned Items - Images
Orphaned Items - Images
Hello,
What does the Orphaned Items - Images button in the admin do?
I know I have some missing images for products so I went into the Admin and clicked on it thinking it would return a list of products without images.
It acts like it is looking but then returns this
Internet Explorer cannot display the webpage
Also, if I try to create a GoogleBase feed with missing images it will redirect me back to the Admin Login page and not create the file.
What does the Orphaned Items - Images button in the admin do?
I know I have some missing images for products so I went into the Admin and clicked on it thinking it would return a list of products without images.
It acts like it is looking but then returns this
Internet Explorer cannot display the webpage
Also, if I try to create a GoogleBase feed with missing images it will redirect me back to the Admin Login page and not create the file.
AC 7.0.3 build 13937
Re: Orphaned Items - Images
Make sure that you have no sub folder under ProductImages folder. It seems that if you have some sub folder under ProductImages folder and trigger the image look up process hangs.
http://bugs.ablecommerce.com/show_bug.cgi?id=8179
http://bugs.ablecommerce.com/show_bug.cgi?id=8179
Re: Orphaned Items - Images
Ohh yes, that is exactly what is doing it. I was relating it to when I uploaded some products without images but at the same time I also started creating directories under ProductImages because it became too large and stopped responding.
Wow, this is even throwing off the Marketing Feeds. I am unable to create any product feeds. It will hang and redirect you back to the admin login page as well.
I have way too many images to try and change them back to the /ProductImages folder. From your experience is this something they might fix fairly quickly or can I expect to wait awhile?
Thank you.
Wow, this is even throwing off the Marketing Feeds. I am unable to create any product feeds. It will hang and redirect you back to the admin login page as well.
I have way too many images to try and change them back to the /ProductImages folder. From your experience is this something they might fix fairly quickly or can I expect to wait awhile?
Thank you.
AC 7.0.3 build 13937
Re: Orphaned Items - Images
I think problem is that when looking for sub directories, code is always looking in ProductImages folder hence putting application into an infinite loop. Try following fix, edit Website/Admin/Catalog/OrphanedItems.aspx.cs file and locate following code line
and update it as below
Now it will fix hang issue and will also start looking in sub folders.
Code: Select all
string[] directories = System.IO.Directory.GetDirectories(imagesFolderPath);
Code: Select all
string[] directories = System.IO.Directory.GetDirectories(dirPath);
Re: Orphaned Items - Images
Mazhar,
I just wanted to give some feedback.
The first time I used it I got a Server Timed Out error. I waited a little while and tried it again and it worked.
It is returning images in the sub folders and saying they don't belong with any products when they actually do (as additional images) so I just wanted to let you know.
It looks like that fix didn't help the feed builders. They still redirect to the login page.
Do you think the sub folders are also causing that? It has to be, that seems like when the problem started.
Thank you.
I just wanted to give some feedback.
The first time I used it I got a Server Timed Out error. I waited a little while and tried it again and it worked.
It is returning images in the sub folders and saying they don't belong with any products when they actually do (as additional images) so I just wanted to let you know.
It looks like that fix didn't help the feed builders. They still redirect to the login page.
Do you think the sub folders are also causing that? It has to be, that seems like when the problem started.
Thank you.
AC 7.0.3 build 13937
Re: Orphaned Items - Images
Well I think there is one more issue with code, locate following code
and update it with this block
Now test it again.
Code: Select all
// ADD THE RELATIVE PATH INFORMATION
if (dirPath != imagesFolderPath) fileName = System.IO.Path.Combine(dirPath.Substring(imagesFolderPath.Length + 1), fileName);
Code: Select all
// ADD THE RELATIVE PATH INFORMATION
if (dirPath != imagesFolderPath) fileName = dirPath.Substring(imagesFolderPath.Length + 1)+"/"+ fileName;
Re: Orphaned Items - Images
Looking better! haha
There is one other thing I see. It is returning some of the items in the list (but not all) in this format
ac\crosses/459_a3_50yr.jpg
shouldn't it be
ac/crosses/459_a3_50yr.jpg ?
because when I hover over the magnifying glass it just shows a broken image red X because that is not the correct path format.
Can you tell if there is something in that orphaneditems file that may be causing that?
There is one other thing I see. It is returning some of the items in the list (but not all) in this format
ac\crosses/459_a3_50yr.jpg
shouldn't it be
ac/crosses/459_a3_50yr.jpg ?
because when I hover over the magnifying glass it just shows a broken image red X because that is not the correct path format.
Can you tell if there is something in that orphaneditems file that may be causing that?
AC 7.0.3 build 13937
Re: Orphaned Items - Images
It seems that our previous fix was not working for root/sub/sub directory structure. Here is the updated code. So instead of using above fix try following fix and replace
with following code block
Code: Select all
// ADD THE RELATIVE PATH INFORMATION
if (dirPath != imagesFolderPath) fileName = System.IO.Path.Combine(dirPath.Substring(imagesFolderPath.Length + 1), fileName);
Code: Select all
// ADD THE RELATIVE PATH INFORMATION
if (dirPath != imagesFolderPath)
{
string basePart = dirPath.Replace(imagesFolderPath+"\\", string.Empty);
basePart = basePart.Replace("\\", "/");
fileName = basePart+"/"+fileName;
}
Re: Orphaned Items - Images
Hi Mazhar,
That didn't seem to work for me. It returned results like
Alt/Alt\b1005.jpg
Just messing around I commented this out
and just left your block of code
and it appears to be working fine now. I will check it out some more as there were a lot of pages to go through.
Thank you!
That didn't seem to work for me. It returned results like
Alt/Alt\b1005.jpg
Just messing around I commented this out
Code: Select all
// ADD THE RELATIVE PATH INFORMATION
if (dirPath != imagesFolderPath) fileName = System.IO.Path.Combine(dirPath.Substring(imagesFolderPath.Length + 1), fileName);
Code: Select all
// ADD THE RELATIVE PATH INFORMATION
if (dirPath != imagesFolderPath)
{
string basePart = dirPath.Replace(imagesFolderPath+"\\", string.Empty);
basePart = basePart.Replace("\\", "/");
fileName = basePart+"/"+fileName;
}
Thank you!
AC 7.0.3 build 13937
Re: Orphaned Items - Images
sounds good