Pics not showing.

rated by 0 users
Answered (Verified) This post has 1 verified answer | 16 Replies | 2 Followers

Nestor Leone
Top 500 Contributor
60 Posts
Points 965
By: Nestor Leone
Posted: Tue, Apr 1 2008 12:02 PM

After copying the contents of the Web folder from the CS 2008 Beta 2 update zip file, and running the Upgrade tool, photos were copied into the filestorage folder in the update folder (not ALL of them, but that's a minor problem). 

Then, I moved them back into the CS folder, where the old structure of /photos/... folder still exists, and all the photos are still there too.

In table cz_PostAttachments, all the photos are referenced with their original filenames. I had CS2007 configured to save files on the HD and not on the DB, so there is just the reference to the files.

Phisically on the HD you can find the files at:

  • /CS2008/filestorage/CommunityServer.Components.Avatars/00/00/00/10/00/avatar.jpg
  • /CS2008/filestorage/CommunityServer.Components.Avatars/00/00/00/10/02/avatar.jpg
  • /CS2008/filestorage/CommunityServer.Components.Avatars/00/00/00/20/00/avatar.jpg
  • /CS2008/filestorage/CommunityServer.Components.Avatars/00/00/00/....
  • ...
  • 0:/Cz2008/filestorage/CommunityServer.Blogs.Components.WeblogFiles/(empty)
  • 0:/Cz2008/filestorage/CommunityServer.Components.PostAttachments/00/00/00/55/66/filename.jpg....
  • 0:/Cz2008/filestorage/CommunityServer.Components.PostAttachments/00/00/00/55/.....
  • 0:/Cz2008/filestorage/CommunityServer.Components.PostAttachments/00/00/00/.....
  • ...

If I try to navigate to them with a web browser, for example:

http://website/filestorage/CommunityServer.Components.Avatars/00/00/00/10/17/avatar.jpg

The file exists and I can see it.

Now, CS refers to that same file as:

http://website/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.10.17/avatar.jpg,

and even though, but it's not shown.

So I supose it's in the handler cfs-file.ashx where the solution must be, or at least somehow lead to where it is. I'll keep on investigating.

It's easy to assume that CS takes the dots away and replaces them with slashes, but for some reason, it's not doing so.


Nestor Leone
www.nestorleone.com.ar
Buenos Aires, Argentina

 
  • Post Points: 20 |

Answered (Verified) Verified Answers

Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,170
CS Developers
Answered (Verified) By: Ben Tiedt
Posted: Fri, Apr 4 2008 8:07 AM In reply to

Nestor Leone:
Some files have been moved by the upgrade tool to a new location but are not seen, and other were directly not "moved". In the old photos\storage folder I have more than 1300 pictures. In the new \CommunityServer.Components.PostAttachments.. (that's where they should be right?) I have less than 100. Is there any way to move these manually so the reference in the DB will make the CS2008 find them?
 

The upgrade tool reads your PostAttachments database table and attempts to either (1) load the file from database storage (if you used database storage) or (2) find the file within the path identified for post attachments for the given application (this is a configurable location in the steps before the upgrade tool is executed)

I'd suggest reviewing the location identified for photo attachments (#2 above) when running the upgrade tool (you should be able to safely run the upgrade tool multiple times).  Also note that resized versions of your photos are *not* migrated (they are resized using file viewers in CS2008).

If you review the storage folder, re-run the upgrade tool, and still don't see all of your photos, you *can* manually migrate files.  Post attachments (such as photos, files and blog/forum attachments) are all stored using the same format in CS2008.  Wherever your files currently reside, they'll need to be moved to your filestorage/ folder using the sub-path CommunityServer.Components.PostAttachments/NN/NN/NN/NN/NN/file.ext where the numbers represent the PostID that the attachment relates to (zero-padded, seperated into two-digit folders) and file.ext is the filename identified in the PostAttachments database table.

Ben Tiedt's Blog

 
Answered (Verified)
  • Post Points: 20 |

All Replies

Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,170
CS Developers
By: Ben Tiedt
Posted: Tue, Apr 1 2008 12:25 PM In reply to

A few questions regarding this issue...

  1. Are you accessing the site as a user with "Download" permissions to the media gallery you are reviewing?
  2. Are avatars not showing as well?  (your issue was photo-related, but your sample was related to avatars)
  3. Can you ensure that your site is now running CS2008?  (there is a media gallery instead of file/photo galleries)
  4. Can you ensure that your communityserver.config file has a <CentralizedFileStorage> region?  Does this region have <fileStore> nodes for CommunityServer.Components.PostAttachments, CommunityServer.Components.Avatars, etc?  Are the basePath values correctly referencing your filestorage/ folder (~ will be interpreted as the root of your CS installation)?

This will help me to know where you are currently and we can work from there.

Thanks!

Ben Tiedt's Blog

 
  • Post Points: 20 |
Nestor Leone
Top 500 Contributor
60 Posts
Points 965
By: Nestor Leone
Posted: Tue, Apr 1 2008 3:20 PM In reply to

Thanks Ben.

1. Yes. the user has download rights.

2. Avatars are not showing. I mentioned pictures, butit affects all kind of files.

3. The site is running CS2008, version:

4. Didn't know about this one.

   <CentralizedFileStorage> Exists

It has <fileStore> nodes for CommunityServer.Components.PostAttachments, CommunityServer.Components.Avatars, etc

basePath values were not correct. They only have: basePath="~/filestorage/"

correcting that.

I'll Let you know.





Nestor Leone
www.nestorleone.com.ar
Buenos Aires, Argentina

 
  • Post Points: 5 |
Nestor Leone
Top 500 Contributor
60 Posts
Points 965
By: Nestor Leone
Posted: Tue, Apr 1 2008 4:11 PM In reply to

I've modified this, but pics still don't show. The section now shows:

<CentralizedFileStorage>

     <fileStore name="CommunityServer.Components.PostAttachments" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Components.PostAttachments/" downloadValidatorType="CommunityServer.Components.PostAttachmentFileAccessValidator, CommunityServer.Components" />

     <fileStore name="CommunityServer.Components.PostAttachments.Temporary" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Components.PostAttachments.Temporary/" />

     <fileStore name="CommunityServer.Components.SiteFiles" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Components.SiteFiles/" />

     <fileStore name="CommunityServer.Blogs.Components.WeblogFiles" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Blogs.Components.WeblogFiles/" />

     <fileStore name="CommunityServer.Components.ImageFileViewer" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Components.ImageFileViewer/" />

     <fileStore name="CommunityServer.Components.MultipleUploadFileManager" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Components.MultipleUploadFileManager/" />

     <fileStore name="CommunityServer.Components.UserFiles" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Components.UserFiles/" />

     <fileStore name="CommunityServer.Components.Ranks" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/" />

     <fileStore name="CommunityServer.Components.Roles" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/" />

     <fileStore name="CommunityServer.Components.Avatars" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/CommunityServer.Components.Avatars/" />

     <fileStore name="CommunityServer.Components.HubAvatars" type="CommunityServer.Components.FileSystemFileStorageProvider, CommunityServer.Components" basePath="~/filestorage/" />

   </CentralizedFileStorage>

but still I get ... no pics shown.

Nestor Leone
www.nestorleone.com.ar
Buenos Aires, Argentina

 
  • Post Points: 35 |
Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,170
CS Developers
By: Ben Tiedt
Posted: Tue, Apr 1 2008 4:20 PM In reply to

Sorry I didn't write back sooner -- "~/filestorage/" should be correct.  You shouldn't identify the sub-folders containing the file store name (this is done automatically).

Let me review your answers and get back to you later today.

Ben Tiedt's Blog

 
  • Post Points: 5 |
Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,170
CS Developers
By: Ben Tiedt
Posted: Tue, Apr 1 2008 4:32 PM In reply to

As another quick test... what happens when you attempt to upload a file through the "User Files" feature?

Does the upload function properly (and you see the file)?  Or is there an error?  If there is an error, can you provide the full error message (with the stack trace)?

Ben Tiedt's Blog

 
  • Post Points: 20 |
HeroicLife
Top 500 Contributor
80 Posts
Points 1,230
By: HeroicLife
Posted: Wed, Apr 2 2008 12:35 AM In reply to

To upgrade the photos you must do two things:

1) Move the filestorage folder from your Upgrader folder to your site root folder.
2) Make sure users have permission to see the image files.

I did step 1, and I thought that if the files were there, there must be some problem with the configuration.  I didn't realize that the user account that Community Server runs under didn't have permission to view the image files.  Once I changed file permissions, all was OK.

Telligent, if you don't have the installer do it, you should mention this in the readme.

 
  • Filed under: |
  • Post Points: 20 |
Nestor Leone
Top 500 Contributor
60 Posts
Points 965
By: Nestor Leone
Posted: Wed, Apr 2 2008 3:19 PM In reply to

All users have permission to read the CS2008 folder and subfolders.

One thing I noted is that  for example, an avatar is rendered as :

<img src="/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.10.17/avatar.jpg" alt="" style="border-width:0px;max-height:50px;max-width:50px;" />

Now, I can't see the cfs-file.ashx file anywhere. Not even inside the zip files I downloaded from this site. I don't have much experience with handlers, so I don't know, but is it ok that this doesn't exist?

 

Nestor Leone
www.nestorleone.com.ar
Buenos Aires, Argentina

 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,170
CS Developers
By: Ben Tiedt
Posted: Wed, Apr 2 2008 3:25 PM In reply to

Nestor Leone:
Now, I can't see the cfs-file.ashx file anywhere. Not even inside the zip files I downloaded from this site. I don't have much experience with handlers, so I don't know, but is it ok that this doesn't exist?
 

It is not a physical file.  It is registered in web.config. 

Can you perform the test I mentioned in this post? http://communityserver.org/forums/p/498120/615713.aspx#615713

Also, can you verify that you are using IIS as your web server?

Ben Tiedt's Blog

 
  • Post Points: 35 |
av613
Not Ranked
39 Posts
Points 665
By: av613
Posted: Fri, Apr 4 2008 12:01 AM In reply to

I am having pretty much the same issue.

When CS 2008 Beta2 goes here:  

http://www.website.com/content/cfs-file.ashx/__key/CommunityServer.Components.Avatars/00.00.00.21.06/avatar.jpg

It returns with a "Directory Listing Denied" error instead of showing the image.

When trying to reupload the image, it says "Success", but the Avatar is still broken.

The permission on the directory are ok. The files can be viewed through browser when pointing to them directly. They do not work with the cfs_file.ashx handler.

 

 
  • Post Points: 5 |
Nestor Leone
Top 500 Contributor
60 Posts
Points 965
By: Nestor Leone
Posted: Fri, Apr 4 2008 12:15 AM In reply to

The Webserver is IIS 6  running on W2K3 server SP2

I made the test and I am able to upload files without any problems, and see them correctly afterwards.

The problem is with old files. They have been moved to the new area but they're not showed. For example, the line that goes right before the name of the picture:

<img src="/resized-image.ashx/__size/80x80/__key/CommunityServer.Components.PostAttachments/00.00.00.56.82/20060511-006.jpg" alt="" />

is not rendered for the old files. Neither is the main table that shows the picture:

       <div class="FileFileDescriptionArea">
           <img src="/resized-image.ashx/__size/425x355/__key/CommunityServer.Components.PostAttachments/00.00.00.56.82/20060511-006.jpg" alt="" />
        <p>&nbsp;</p><div style="clear:both;"></div>
        <p />
        <div><div id="ctl00_ctl00_bcr_bcr_ctl20_ctl00_Container" style="display: none;">
       </div>

I guess this must have something to do with it.

This sample I showed her has to do with pics from the media gallery. But it affects avatars, and all other files I had uploaded before in the old Files area of CS2007.

Hope this helps you guys understand better this problem.

Nestor Leone
www.nestorleone.com.ar
Buenos Aires, Argentina

 
  • Post Points: 20 |
Ben Tiedt
Top 10 Contributor
3,344 Posts
Points 63,170
CS Developers
By: Ben Tiedt
Posted: Fri, Apr 4 2008 1:04 AM In reply to

Nestor Leone:

I made the test and I am able to upload files without any problems, and see them correctly afterwards.

 

Great!  This tells me that either:

1.  Your "old" files were not copied to the correct location.  If you search for the file that you uploaded in your test of "user files", where is it?  It should be in a path ending with CommunityServer.Components.UserFiles/NN/NN/NN/NN/NN/filename -- is this path in the same root folder as your "old" files?

2.  The "old" files do not have the proper permissions to allow the ASP.Net process (which executes Community Server) from accessing the file content.  Enabling this access depends on the user that the ASP.Net process is executing under (which you should be able to find in your IIS configuration).  This user should have permission to read/write/modify files within the root file storage folder (web/filestorage/ by default).

Can you check out these two possible issues and let me know what you find?

Ben Tiedt's Blog

 
  • Post Points: 5 |
Nestor Leone
Top 500 Contributor
60 Posts
Points 965
By: Nestor Leone
Posted: Fri, Apr 4 2008 1:48 AM In reply to

Reviewng other posts in this forum, I changed the theme of the site and voilá, the avatars are seen again.

Some old pics and files seem to be shuffled under diferent folders, but it's a small % of the total files that I had in CS2007. Now I need to transfer all the rest of the pics and also make the ones referenced in the database show online.

For those pics that it seems are not in the filestorage folder i get the message "This file cannot be viewed. You may download it to view it locally. " in the media gallery, and obviously when I try to donwload them

So the problem seems partly solved. But, it seems the upgrade tool made it's job by half. I get a "page not found" error. They now refer to http://website/media/p/4140/ and not to the long /filestorage/.... folder.

About your questions:

1. I suposed so too, the old files are not where they should be. The new test file is in the correct folder.  I uploaded it from the media gallery so the location is \CS2008\filestorage\CommunityServer.Components.PostAttachments\00\00\00\49\12\filename.ext. It's the same as where all the other old files are.

2. The user that's running under is IUSR_servername - and it has full permissions to the web/ folder. 

Some files have been moved by the upgrade tool to a new location but are not seen, and other were directly not "moved". In the old photos\storage folder I have more than 1300 pictures. In the new \CommunityServer.Components.PostAttachments.. (that's where they should be right?) I have less than 100. Is there any way to move these manually so the reference in the DB will make the CS2008 find them?

 

Nestor Leone
www.nestorleone.com.ar
Buenos Aires, Argentina

 
  • Post Points: 20 |