Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Album permissions, thumbnails, synchronization
Kostya
#1 Posted : Thursday, 26 August 2010 1:10:29 AM(UTC)
Rank: Member

Joined: 4/08/2010(UTC)
Posts: 6
Location: Canada

Hi, Roger.

Thank you for replies on my previous posts. I've got few more questions:

1. When I edit a role and uncheck one sub-album, it doesn't show top level albums anymore under All albums. For example, I have 10 top level albums ("Year 2000" up to "Year 2010"). Each one has 12 sub-albums (January to February). If my son's role applies to all of them, he can see all 10 top level albums under All albums. Let's say I don't want him to be ale to see album "Year 2009/February", so I uncheck it in his role's properties. Now when he logs in he doesn't see 10 albums under All albums. Instead, there are all sub-albums from Year 2009 folder right under All Albums.

2. If there are no pictures in "Year 2009" album, it get's thumbnail which says "Empty" which makes an impression that the Album is empty. Is there a way to change this default thumbnail picture? I also noticed that sometimes upper level album gets the same thumbnail as one of it's sub-albums, even when upper level album has no pictures in its root. Not sure why it happens, but that's exactly what I'm looking for to accomplish.

3. Related to #2: is it possible to assign the same thumbnail to all albums and all its sub-sub-sub albums without copying this picture inside each folder and sub-folder?

4. Is there a way to see if there is a synchronization in progress. Sometime I run synchronization, get an error message, run it again and the message that another synchronization is already in progress.

5. Is there a way to run a synchronization so that it doesn't stop if there is an error message but keeps going? I've got 70 000 pictures and if I get an error message on number 65 000, I've got to start the process all over.
Examples of error messages I was getting: "Access denied", "Path is longer than 260 symbols". So. I need to be aware of them to correct them later, but need synchronization not to stop because of that.

Appreciate your time.
Roger Martin
#2 Posted : Thursday, 26 August 2010 2:18:34 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,301
Location: Fort Atkinson, WI

Quote:
1. When I edit a role and uncheck one sub-album, it doesn't show top level albums anymore under All albums


I see what you are saying. Unfortunately, that is a limitation in the current security architecture. Associating an album with a role requires that all of its children are also associated. This greatly simplifies the code but it means some situations are not easily handled.

Quote:
Is there a way to change this default thumbnail picture?


There are some settings in the section 'Empty album thumbnail settings' on the Albums - General page in the Site admin area. You can also assign any media object as the album thumbnail by manually updating the ThumbnailMediaObjectId column in the table gs_Album. You can see the ID in the 'moid' query string parameter when you are viewing a media object.

Quote:
is it possible to assign the same thumbnail to all albums


See previous comment about manually updating the table.

Quote:
4. Is there a way to see if there is a synchronization in progress.


The only way is to inspect the table gs_Synchonize. There is a column named SynchState that contains a number that maps to the following states:

Complete = 0
SynchronizingFiles = 1
PersistingToDataStore = 2
Error = 3
AnotherSynchronizationInProgress = 4

Quote:
5. Is there a way to run a synchronization so that it doesn't stop if there is an error message but keeps going?


The synchronization process does silently handle many well-understood error situations, but I intentionally made it abort when unusual errors occur or ones that don't typically occur during my testing. The reason is that these might represent bugs, and I want users to report them so they can be fixed.

One could argue that I should collect errors as they occur while continuing to run the synch, but the very fact that these are unexpected errors means it is risky to continue. Better to stop and encourage the user to fix them.

Regarding "access denied", I am considering changing the synch logic to ignore these errors. It would be helpful if you posted the full error details of this error (look in the error log).

Finally, note that once a media object is synchronized, subsequent synchs are very fast because GSP is smart enough to notice that it does not need to build a thumbnail or compressed image. Reprocessing those first 65,000 objects to get back to the location of the previous failure should take a fraction of the original time.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Kostya
#3 Posted : Thursday, 26 August 2010 2:53:42 AM(UTC)
Rank: Member

Joined: 4/08/2010(UTC)
Posts: 6
Location: Canada

Roger, thank you for the info.

I think I was able to reproduce this:
Quote:
I also noticed that sometimes upper level album gets the same thumbnail as one of it's sub-albums, even when upper level album has no pictures in its root.


It happens if you run synchronization without child directories in the folder which has no pictures in its root. It gets the the same thumbnail as one of it's sub-folders.

Here is the example of "access denied" error. Also, I've got a collection of different synch. errors, including "enumeration operation may not execute.", "Failed to compare two elements in the array", "Exception has been thrown by the target of an invocation". Would it be helpful if I post them?

Code:
This error report was generated by Gallery Server Pro.
Error: Access to the path '\\Wat-fs1\shared\Yearbook Pictures\2009 yearbook photos\Detroit\2009-06-06 Detroit Tiger Game\IMG_7353.jpg' is denied.
Error Summary
Url    http://216.16.227.164/galleryserverpro/gs/services/Gallery.asmx/Synchronize

Timestamp    8/17/2010 9:11:55 AM
Exception Type    System.UnauthorizedAccessException
Message    Access to the path '\\Wat-fs1\shared\Yearbook Pictures\2009 yearbook photos\Detroit\2009-06-06 Detroit Tiger Game\IMG_7353.jpg' is denied.
Source    mscorlib
Target Site    Void WinIOError(Int32, System.String)
Stack Trace    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize)
at System.IO.File.OpenFile(String path, FileAccess access, SafeFileHandle& handle)
at System.IO.File.SetCreationTimeUtc(String path, DateTime creationTimeUtc)
at System.IO.FileSystemInfo.set_CreationTimeUtc(DateTime value)
at GalleryServerPro.Business.HelperFunctions.GetHashKeyUnique(FileInfo originalFile)
at GalleryServerPro.Business.Image..ctor(Int32 id, Int32 parentId, IAlbum parentAlbum, String title, String hashKey, String thumbnailFilename, Int32 thumbnailWidth, Int32 thumbnailHeight, Int32 thumbnailSizeKb, String optimizedFilename, Int32 optimizedWidth, Int32 optimizedHeight, Int32 optimizedSizeKb, String originalFilename, Int32 originalWidth, Int32 originalHeight, Int32 originalSizeKb, Int32 sequence, String createdByUsername, DateTime dateAdded, String lastModifiedByUsername, DateTime dateLastModified, Boolean isPrivate, Boolean isInflated, FileInfo imageFile)
at GalleryServerPro.Business.Image..ctor(FileInfo imageFile, IAlbum parentAlbum)
at GalleryServerPro.Business.Factory.CreateImageInstance(FileInfo imageFile, IAlbum parentAlbum, Boolean forceNew)
at GalleryServerPro.Business.Factory.CreateLocalMediaObjectInstance(FileInfo mediaObjectFile, IAlbum parentAlbum, Boolean forceNew)
at GalleryServerPro.Business.SynchronizationManager.CreateNewMediaObject(IAlbum album, FileInfo file)
at GalleryServerPro.Business.SynchronizationManager.SynchronizeMediaObjectFiles(DirectoryInfo directory, IAlbum album)
at GalleryServerPro.Business.SynchronizationManager.SynchronizeChildDirectories(DirectoryInfo parentDirectory, IAlbum parentAlbum)
at GalleryServerPro.Business.SynchronizationManager.SynchronizeChildDirectories(DirectoryInfo parentDirectory, IAlbum parentAlbum)
at GalleryServerPro.Business.SynchronizationManager.Synchronize(String synchId, IAlbum album, String userName)
at Gsp.Gallery.Synchronize(Int32 albumId, String synchId, Boolean isRecursive, Boolean overwriteThumb, Boolean overwriteOpt, Boolean regenerateMetadata)
App Error ID    -2147483648
Gallery ID    1
HTTP User Agent    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
Form Variables
<none>
Cookies
ASP.NET_SessionId    1glx1dvxhwred3jchjquvofc
.ASPXAUTH    644DA20247E41A5E4384670C14FD90313BF5C1268CFD9E39021ED70E24AAD0A858D03BEF F947880F5EF453DE1636C5CE4EA672796C762A783F8C39DE23015AA46C8D6DF20ADF98B 399EDB425AEAE0810
Session Variables
ReferringUrl    http://216.16.227.164/galleryserverpro/default.aspx?aid=2375

Server Variables
ALL_HTTP    HTTP_CACHE_CONTROL:no-cache
HTTP_CONNECTION:Keep-Alive
HTTP_CONTENT_LENGTH:155
HTTP_CONTENT_TYPE:application/json; charset=utf-8
HTTP_ACCEPT:*/*
HTTP_ACCEPT_ENCODING:gzip, deflate
HTTP_ACCEPT_LANGUAGE:en-us
HTTP_COOKIE:ASP.NET_SessionId=1glx1dvxhwred3jchjquvofc; .ASPXAUTH=644DA20247E41A5E4384670C14FD90313BF5C1268CFD9E39021ED70E24AAD0 A858D03BEFF947880F5EF453DE1636C5CE4EA672796C762A783F8C39DE23015AA46C8D6 DF20ADF98B399EDB425AEAE0810
HTTP_HOST:216.16.227.164
HTTP_REFERER:http://216.16.227.164/galleryserverpro/default.aspx?g=task_ synchronize&aid=2375
HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
HTTP_X_REQUESTED_WITH:XMLHttpRequest
ALL_RAW    Cache-Control: no-cache
Connection: Keep-Alive
Content-Length: 155
Content-Type: application/json; charset=utf-8
Accept: */*
Accept-Encoding: gzip, deflate
Accept-Language: en-us
Cookie: ASP.NET_SessionId=1glx1dvxhwred3jchjquvofc; .ASPXAUTH=644DA20247E41A5E4384670C14FD90313BF5C1268CFD9E39021ED70E24AAD0 A858D03BEFF947880F5EF453DE1636C5CE4EA672796C762A783F8C39DE23015AA46C8D6 DF20ADF98B399EDB425AEAE0810
Host: 216.16.227.164
Referer: http://216.16.227.164/galleryserverpro/default.aspx?g=task_synchronize&a id=2375
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
x-requested-with: XMLHttpRequest
APPL_MD_PATH    /LM/W3SVC/1/ROOT/galleryserverpro
APPL_PHYSICAL_PATH    C:\inetpub\wwwroot\galleryserverpro\
AUTH_TYPE    Forms
AUTH_USER    admin
AUTH_PASSWORD    
LOGON_USER    admin
REMOTE_USER    admin
CERT_COOKIE    
CERT_FLAGS    
CERT_ISSUER    
CERT_KEYSIZE    
CERT_SECRETKEYSIZE    
CERT_SERIALNUMBER    
CERT_SERVER_ISSUER    
CERT_SERVER_SUBJECT    
CERT_SUBJECT    
CONTENT_LENGTH    155
CONTENT_TYPE    application/json; charset=utf-8
GATEWAY_INTERFACE    CGI/1.1
HTTPS    off
HTTPS_KEYSIZE    
HTTPS_SECRETKEYSIZE    
HTTPS_SERVER_ISSUER    
HTTPS_SERVER_SUBJECT    
INSTANCE_ID    1
INSTANCE_META_PATH    /LM/W3SVC/1
LOCAL_ADDR    216.16.227.164
PATH_INFO    /galleryserverpro/gs/services/Gallery.asmx/Synchronize
PATH_TRANSLATED    C:\inetpub\wwwroot\galleryserverpro\gs\services\Gallery.asmx
QUERY_STRING    
REMOTE_ADDR    216.16.227.129
REMOTE_HOST    216.16.227.129
REMOTE_PORT    12680
REQUEST_METHOD    POST
SCRIPT_NAME    /galleryserverpro/gs/services/Gallery.asmx
SERVER_NAME    216.16.227.164
SERVER_PORT    80
SERVER_PORT_SECURE    0
SERVER_PROTOCOL    HTTP/1.1
SERVER_SOFTWARE    Microsoft-IIS/7.5
URL    /galleryserverpro/gs/services/Gallery.asmx
HTTP_CACHE_CONTROL    no-cache
HTTP_CONNECTION    Keep-Alive
HTTP_CONTENT_LENGTH    155
HTTP_CONTENT_TYPE    application/json; charset=utf-8
HTTP_ACCEPT    */*
HTTP_ACCEPT_ENCODING    gzip, deflate
HTTP_ACCEPT_LANGUAGE    en-us
HTTP_COOKIE    ASP.NET_SessionId=1glx1dvxhwred3jchjquvofc; .ASPXAUTH=644DA20247E41A5E4384670C14FD90313BF5C1268CFD9E39021ED70E24AAD0 A858D03BEFF947880F5EF453DE1636C5CE4EA672796C762A783F8C39DE23015AA46C8D6 DF20ADF98B399EDB425AEAE0810
HTTP_HOST    216.16.227.164
HTTP_REFERER    http://216.16.227.164/galleryserverpro/default.aspx?g=task_synchronize&a id=2375

HTTP_USER_AGENT    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)
HTTP_X_REQUESTED_WITH    XMLHttpRequest

Roger Martin
#4 Posted : Thursday, 26 August 2010 3:05:18 AM(UTC)
Roger Martin

Rank: Administration

Joined: 3/08/2007(UTC)
Posts: 3,301
Location: Fort Atkinson, WI

Quote:
I also noticed that sometimes upper level album gets the same thumbnail as one of it's sub-albums, even when upper level album has no pictures in its root.


That is intentional behavior.

Thanks for the 'access denied' error.

I believe the errors "enumeration operation may not execute." and "Failed to compare two elements in the array" are a result of multi-threading issues when multiple users access the same object. Fixing this is already on my to-do list, so you don't have to give me the error.

The error "Exception has been thrown by the target of an invocation" is an expected error when .NET 3, 3.5, or 4.0 is not installed on the server, although it should happen silently and not bubble up to the UI. (Technically, it is more of an informational message rather than an error and does not represent a problem) If this is not the case, then yes, I would like to see the details.
Roger Martin
Creator and Lead Developer of Gallery Server Pro
Rss Feed  Atom Feed
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.