+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / Image Gallery trouble

Image Gallery trouble

22 posts, 1 answered
  1. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    06 Mar 2008
    Link to this post
    I'm able to "upload" images to a photo gallery and get the metadata to display on a page, but not the actual Photos themselves.  I'm running local / Cassini so script mappings (or lack thereof) should not be the problem.  Thoughts?

    Zack
  2. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    06 Mar 2008
    Link to this post
    I watched SQL Profiler as I made the following request

    http://localhost:3478/Libraries/test/IMG_323344.tmb?width=150&height=150&decreaseOnly=true&proportional=true

    The URL property in the resulting query was looking for "~Libraries/test/IMG_323344" but the column in the database contained the value "~/Libraries/test/IMG_323344"

    Might not be the whole problem but might be a factor.

    Z

  3. sam
    sam avatar
    102 posts
    Registered:
    31 Jan 2008
    07 Mar 2008
    Link to this post
    I also can't see the image?
    I can't find any folders for libraries as well.

    The sample library images are also not showing up..

    HELP!!
  4. sam
    sam avatar
    102 posts
    Registered:
    31 Jan 2008
    07 Mar 2008
    Link to this post
    I also can't see the image?
    I can't find any folders for libraries as well.

    The sample library images are also not showing up..

    HELP!!
  5. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    07 Mar 2008
    Link to this post
    Hello Zack,

    It seems there is a tricky bug and we should determine why it occurs. Any additional help would be very much appreciated. First, please let us know whether you see the image in the administration part of Sitefinity or the problem occurs in the public part. Does the image show up on server reset and do you experience this problem in IIS? Also please check whether the URL rewrite format for the Libraries provider in the web.config has the following value:

    urlRewriteFormat

    ="~/{Provider}/{LibraryName}/[Name].sflb"

    Please let us know if you spot anything else. Thanks in advance, your cooperation is much appreciated.

    Sam, the images are not saved in the file system. They are stored in the database. This is the reason why you cannot see them in any folder. You said that you cannot see the sample images. Do you mean you cannot see them on the site or in the file system? We are talking about the TIU site here, right?

    Best wishes,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    07 Mar 2008
    Link to this post
    Vassil,

    After "uploading" images I have never been able to see them in either the Admin UI or front end.  To clarify, when I add an image gallery to a test page I AM able to see a link and metadata for ALL of the images I've uploaded, just not the actual thumbnail or full size image.

    I've repeated my testing using IIS instead of Cassini and experienced the same results.  On a side note, I saw nothing in the install docs about creating script mappings for the .tmb or .sflb extensions, but fail to see how this functionality (apparent SQL issue aside) could possibly work until they're added.  I added these mappings to IIS and repeated my tests, still no luck.

    In my web.config file, the Libraries provider is configured as follows:

    <add name="Libraries" urlRewriteFormat="~/{Provider}/{LibraryName}/[Name].sflb" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Name" applicationName="/Libraries" allowVersioning="True" allowLocalization="False" localizationProviderName="" allowWorkflow="True" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Libraries.Data.DefaultProvider, Telerik.Libraries.Data" tagEditorTemplate="~/Sitefinity/Admin/ControlTemplates/Libraries/BatchTagsEditor.ascx"/>

    It appears to me that the urlRewriteFormat attribute is what you expect it to be.

    Sorry that I wasn't able to uncover something more obvious.  Hoping that maybe we're just looking at a small SQL fix? :D

    Zack
  7. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    10 Mar 2008
    Link to this post
    Any update from Telerik re: this issue??  I am very much looking forward to putting 3.2 into production but am holding out until there's some sort of resolution on this issue.

    Thanks,

    Zack
  8. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    10 Mar 2008
    Link to this post
    Hi Zack,

    We are currently looking for the cause of this error. Unfortunately to no avail. Actually, we cannot even reproduce the behavior. This is why we suppose there is some problem with the setup.

    Would you please double check that you have registered the ContentHttpHandler handler for the .tmb and .sflb extensions in the application web.config? Did you add the mappings in the IIS and uncheck the "Check that file exists" option from the Configuration window? The problem might be connected to the image types you upload or their names.

    It would be really very helpful if you could give us remote connection to your project or at least send it to us along with the database and the images you are trying to upload. We really need to find out the reason for this problem so any help is greatly appreciated.

    Thanks in advance,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    11 Mar 2008
    Link to this post
    Vassil,

    Good News / Bad News.  Bad news is that I'm still having trouble with the Image Library, good news is that I have additional information for you that should help you reproduce the issue.

    First of all, it appears that converting Sitefinity to a Web Application Project (WAP) is the root of this particular issue / problem.  We started using Sitefinity as of version 3.1, and we elected to go the WAP route based on the following forum thread: http://www.sitefinity.com/support/forums/support-forum-thread/b1043S-bbbdmk.aspx

    When Sitefinity 3.2 was released last week, I quickly set out to convert it to WAP and move our customizations (Themes, User Controls, etc.) into the new version.  I have only run into a couple of issues with the 3.2 release so far, and this Image Library issue is the only one for which I have not been able to come up with a resolution.

    In light of this I decided to test the Image Library functionality using an "out of the box" 3.2 Web Site Project and the Image Library functionality worked as expected.

    So using SQL profiler, the "out of the box" Sitefinity 3.2 website project and our WAP "port" of 3.2 (both of which pointed to the same database), I discovered a difference in one of the SQL parameter values that seems like it would definitely cause a problem ...

    SQL Generated by Web Site Project
    ----------------------------------
    exec sp_executesql N'SELECT ''DCmsContentBase;Application;ID;MimeType;ParentID;Url;CommentsCount;'' AS NN_TABLE_ID_1,
    [dbo].[sf_CmsContentBase].[Application], [dbo].[sf_CmsContentBase].[ID], [dbo].[sf_CmsContentBase].[MimeType],
    [dbo].[sf_CmsContentBase].[ParentID], [dbo].[sf_CmsContentBase].[Url], [dbo].[sf_CmsContentBase].[CommentsCount]
       
        FROM [dbo].[sf_CmsContentBase] WHERE ( ([dbo].[sf_CmsContentBase].[Application] = @P_p1 AND [dbo].[sf_CmsContentBase].[Url] = @P_p2 ) ) ',
    N'@P_p1 nvarchar(10),@P_p2 nvarchar(27)', @P_p1 = N'/Libraries', @P_p2 = N'~/Libraries/tester/IMG3673a'

    SQL Generated by Web Application Project
    -----------------------------------------
    exec sp_executesql N'SELECT ''DCmsContentBase;Application;ID;MimeType;ParentID;Url;CommentsCount;'' AS NN_TABLE_ID_1,
    [dbo].[sf_CmsContentBase].[Application], [dbo].[sf_CmsContentBase].[ID], [dbo].[sf_CmsContentBase].[MimeType],
    [dbo].[sf_CmsContentBase].[ParentID], [dbo].[sf_CmsContentBase].[Url], [dbo].[sf_CmsContentBase].[CommentsCount]
       
        FROM [dbo].[sf_CmsContentBase] WHERE ( ([dbo].[sf_CmsContentBase].[Application] = @P_p1 AND [dbo].[sf_CmsContentBase].[Url] = @P_p2 ) ) ',
    N'@P_p1 nvarchar(10),@P_p2 nvarchar(26)', @P_p1 = N'/Libraries', @P_p2 = N'~Libraries/tester/IMG3673a'

    Note the difference in the "@P_p2" parameter value that is being generated by the two project types.  The Web Site Project correctly injects "~/Libraries...", while the converted Web Application Project injects only "~Libraries...", which does match the data that is injected into the database at upload time. 

    Both projects were using assemblies versioned 3.2.1500.2.

    For a number of reasons mostly related to the VS development experience (include/exclude file management, namespacing, build automation, reference management, etc.) we are VERY interested in continuing to use Sitefinity in Web Application Project form. 

    If you need any further information from me (re: the WAP conversion, etc.) please let me know.

    Interested in your thoughts on all this... :D

    Thanks,

    Zack
  10. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    11 Mar 2008
    Link to this post
    Hello Zack,

    Thank you very much for giving us exact instructions on how to reproduce this error. It seems that there is a bug when the application name is "/". That is when your site is set as default site or you are using web application project inside Visual Studio. This is a serious problem for the Images&Documents module and it will be fixed for the upcoming service pack. It must be also very clear that we kindly appreciate when you provide such beneficial information to us. We have updated your Telerik account.

    Greetings,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    12 Mar 2008
    Link to this post
    Vassil,

    Glad to be of help with this issue.  I'm very much looking forward to the service pack so I can start using the Image Libraries feature.  So naturally my next question would be if there's an estimated date for v 3.2 service pack 1 ???

    Thanks,

    Zack
  12. Nikifor
    Nikifor avatar
    232 posts
    Registered:
    18 May 2013
    12 Mar 2008
    Link to this post
    Hi Zack,

    Our estimate is that we will be able to make the Service Pack available by the end of this month.


    All the best,
    Nikifor Hristov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  13. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    13 Apr 2008
    Link to this post
    Hello Zack,

    I'm having exactly the same problem, did you download and installed v3.2 SP1 ? Did it solve your issue, please let me know asap.

    thanks
  14. Zack
    Zack avatar
    41 posts
    Registered:
    18 Apr 2007
    14 Apr 2008
    Link to this post
    Zubair,

    Based on my initial testing, it appears as though SP1 DOES fix the Image Library problem when converting Sitefinity to a Web Application Project.

    Hope it works for you!

    Zack
  15. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    15 Apr 2008
    Link to this post
    Thanks Zack, I'll try it and post the feedback.
  16. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    16 Apr 2008
    Link to this post
    SP1 didn't solve the problem.

    Vassil can you please look into this, I had no choice but write my own image gallery module as we're running out of time for this project :(
  17. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    17 Apr 2008
    Link to this post
    Hi Zubair,

    SP1 should indeed fix the problem with the images paths when the application name is "/". Would you please double check that the problem is not coming because you have not mapped the .sflb and .tmb extensions in the IIS, that you have registered the http handler for these extensions in the web.config. That is - all described about the 404 error for images and documents in the troubleshooting document should be checked.

    However, if this does not fix your problem we will give you the code of the http handler where the problem lays. You could even see the code of the old handler (the one from the official release) in this post.

    I would also kindly ask you to let us now if the problem still exists and in case you fixed it, what option did you choose. Was it something you missed to configure or you did any of the workarounds I sent. This would greatly help us. Thanks in advance for your cooperation.

    Sincerely yours,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  18. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    17 Apr 2008
    Link to this post
    I had installed everything from this patch 'SiteFinity_3_2_standard_patch_1526.zip' and copied them directly to my website on our testing server. But I still could not see any images in SF or on the website.

    However, IIS didn't have the extensions .sflb and .tmb mapped, I added them and now I see the images. Please add clear instructions to this problem on the upgrading guide page.

    One question though, how are these images stored  ?
  19. Georgi
    Georgi avatar
    3583 posts
    Registered:
    28 Oct 2016
    17 Apr 2008
    Link to this post
    Hello Zubair,

    The images are stored in your project's database.
    The .sflb and .tmb extensions mapping is described in the Troubleshooting Section in the User Manual, as well as in our online Troubleshooting document.

    We will consider your suggestion.

    Don't hesitate to contact us if you have other questions.

    Regards,
    Georgi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  20. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    17 Apr 2008
    Link to this post
    hi Georgi,

    I just checked that image resizing/cropping doesn't work

    Libraries/Images/DICAZIE7.tmb?width=150&height=150&decreaseOnly=true&proportional=true

    if I upload two images of different proportion, I need them their thumbnails to appear in the same size, so the thumbnail generator should crop the larger image if need be.

    Also I'm not able to specify the width and height of the thumbnail separately, how can I do that ?
  21. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    17 Apr 2008
    Link to this post
    hi Georgi,

    I just checked that image resizing/cropping doesn't work properly.

    Libraries/Images/DICAZIE7.tmb?width=150&height=150&decreaseOnly=true&proportional=true

    if I upload two images of different proportion, I need their thumbnails to appear in the same size, so the thumbnail generator should crop the larger image if need be.

    Also I'm not able to specify the width and height of the thumbnail separately, how can I do that ?
    Answered
  22. Vassil Daskalov
    Vassil Daskalov avatar
    261 posts
    Registered:
    18 May 2013
    23 Apr 2008
    Link to this post
    Hi Zubair,

    I believe there is some misunderstanding on what you expect of the image resizing functionality. We also do not provide cropping functionality for images. I will try to give better explanation at the dynamic resizing of the images which you could find in the user manual as well as in the developer manual. The dynamic resizing of images is put into effect by specifying additional query string keys to the image URL. These keys are: width, height, decreaseOnly and proportional. In order to resize the image you should set the width and height keys at a minimum. In case you provide only them, the image would be resized according to the dimensions set by width and height but proportionally. Thus, if your image is with dimensions 50x50 and you provider 100x200 values for the query string keys, this means that the image would be resized to 100x100. The resulting URL would be something like this:

    http://localhost/job/Libraries/Da%20Vinci/leonardo.sflb?width=100&height=200


     In case you need the picture to be stretched to 100x200 you should set the proportional key to false:

    http://localhost/job/Libraries/Da%20Vinci/leonardo.sflb?width=100&height=200&proportional=false


    And, in case you need the resizing only for images which have width bigger than 100 or with height bigger than 200, you should set the decreaseOnly property to true:

    http://localhost/job/Libraries/Da%20Vinci/leonardo.sflb?width=100&height=200&proportional=false&decreaseOnly=true


    Hope this makes sense. We also do not provide functionality for thumbnails resizing only. You can do this only dynamically.

    Greetings,
    Vassil Daskalov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
22 posts, 1 answered