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

Forums / Set-up & Installation / Questions regarding upgrade to 3.7SP4

Questions regarding upgrade to 3.7SP4

5 posts, 2 answered
  1. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    23 Sep 2010
    Link to this post
    Yesterday, I downloaded the patch upgrade for 3.7SP4, standard edition for the 4.0 framework.
    Since I had quite a few tweaks to templates etc, I opted to use a comparison program and bring all of the changes for SP4 into my website.
    Previously, I had been running all of our Sitefinity sites as 3.5 integrated pipeline mode.
    The install instructions I read here showed using classic with the 4.0 framework. Does it need to be classic or does integrated work? Is there and advantage of one over the other?
    Anyway... I followed the instructions and used classic. When the site loaded the first time, I got the screen to enter the database info, just as with a new SF install. I was surprised to see this since, my db was already defined in the web.config.
    I entered the info, SF then prompted me to login and put me in the backend.... my data was there and all was good.
    When I tried to load the public side, I got a yellow screen which was related to one of my user controls.
    DataBinding: 'Telerik.Cms.Engine.Data.CmsContentBase' does not contain a property with the name 'AlternateText'.
    This control binds a ListView to the items contained in a Sitefinity Library and then uses jQuery to create a slideshow of the images. The AltText of the images is supposed to come from "AlternateText" as well as the tooltip, if you hover on an image... I've removed the references to "AlternateText" and the site loads normally, minus that functionality.
    I see in my database, sf_GCMetaData the AlternateText data is still there. Any idea why this would be failing in SP4, when it works in SP3? Or is there anything about the way that I performed the upgrade that could have contributed to this issue?

    thanks in advance!
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    24 Sep 2010
    Link to this post
    Hi Scott Rozman,

    There instructions for setting up Sitefinity 3.7 SP4 to run in .NET 4.0 have the classic pipeline mode only for the Sitefinity 3.7 SP4 project manager, not for the Sitefinity 3.7 SP4 website. The last image in this KB which shows how to configure the website is running the website in integrated pipeline mode (those are the application pool settings). If your website has been previously running in integrated pipeline mode I think that it would be best if you continue to run in integrated pipe line.

    You will see the database setup screen if when merging the .NET 4.0 and your old web.config files you have set the disabled property in telerik/cms configuration section to true:
         <cms defaultProvider="Sitefinity" pageExtension=".aspx" disabled="false"
    pageEditorUIMode="Overlay">

    If this property is set to false you will not see the configuration page. If you have been using a merge tool it might have detected difference in this line as in fresh websites this property is set to true.

    There have been no changes in meta data from previous versions. One thing to note here. Meta data is not called directly - e.g. contentItem.AlternateText for example. It has never been this way, you would get the above mentioned error message in older versions too, if you try to get the property this way. You have to use the GetMetaData("MetafieldName") method. Can you please show us your binding code and markup?

    Sincerely yours,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    24 Sep 2010
    Link to this post
    Thanks so much for the clarifications on integrated vs. classic and why the startup screen showed up.
    Regarding the code for the control, here is the code-behind in VB:
    Imports System
    Imports System.Collections
    Imports System.Collections.Generic
    Imports System.Linq
    Imports System.Web
    Imports System.Web.UI
    Imports System.Web.UI.WebControls
    Imports System.ComponentModel
    Imports System.Diagnostics
    Imports System.Web.UI.HtmlControls
    Imports Telerik.Cms.Web.UI
    Imports Telerik.Cms.Engine
    Imports Telerik.Libraries
    Imports System.Text
    Partial Class UserControls_jqCycleSlideshow
        Inherits System.Web.UI.UserControl
        Dim _ImageLibraryName As String
        ''' <summary>
        ''' Image Library Name
        ''' </summary>
        <Category("Settings"), _
         Description("Enter the image library name to display.")> _
        Public Property ImageLibraryName() As String
            Get
                If (_ImageLibraryName Is Nothing) Then
                    Return String.Empty
                End If
                Return _ImageLibraryName.ToString
            End Get
            Set(ByVal value As String)
                _ImageLibraryName = value
            End Set
        End Property
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim libMgr As New LibraryManager()
            If ImageLibraryName <> Nothing Then
                Dim [lib] As ILibrary = libMgr.GetLibrary(ImageLibraryName)
                Dim libItems As IList
                libItems = [lib].GetItems()
                Randomize(libItems)
                lvCycleSlideshow.DataSource = libItems
                lvCycleSlideshow.DataBind()
            End If
        End Sub
        Private Shared Sub Randomize(ByVal list As IList)
            Dim rng As Random = New Random
            Dim i As Integer = (list.Count - 1)
            Do While (i > 0)
                Dim swapIndex As Integer = rng.Next((i + 1))
                If (swapIndex <> i) Then
                    Dim tmp As Object = list(swapIndex)
                    list(swapIndex) = list(i)
                    list(i) = tmp
                End If
                i = (i - 1)
            Loop
        End Sub
    End Class

    and the ListView:
    <asp:ListView ID="lvCycleSlideshow" runat="server">
    <LayoutTemplate>
            <div id="pics">
                <span ID="itemPlaceholder" runat="server" />
            </div>
    </LayoutTemplate>
    <ItemTemplate>
        <asp:Image runat="server" height="232" width="180" id="na" AlternateText='<%# Eval("AlternateText") %>' Tooltip='<%# Eval("AlternateText") %>' ImageUrl='<%# String.Format("{0}.sflb.ashx", Eval("URL")) %>'></asp:Image>
    </ItemTemplate>
    </asp:ListView>

    We've used this as-is with 3.7SP1 and 3.7SP3.
  4. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    24 Sep 2010
    Link to this post
    Hi Scott Rozman,

    You can set the AlternateText in the event of databinding the list view:
    Imports System.ComponentModel
    Imports Telerik.Cms.Web.UI
    Imports Telerik.Cms.Engine
    Imports Telerik.Cms.Engine.WebControls.Categories
    Imports Telerik.Libraries
     
    Partial Class UserControls_VBControlascx
        Inherits System.Web.UI.UserControl
        Dim _ImageLibraryName As String
        ''' <summary>
        ''' Image Library Name
        ''' </summary>
        <Category("Settings"), _
         Description("Enter the image library name to display.")> _
        Public Property ImageLibraryName() As String
            Get
                If (_ImageLibraryName Is Nothing) Then
                    Return String.Empty
                End If
                Return _ImageLibraryName.ToString
            End Get
            Set(ByVal value As String)
                _ImageLibraryName = value
            End Set
        End Property
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim libMgr As New LibraryManager()
            If ImageLibraryName <> Nothing Then
                Dim [lib] As ILibrary = libMgr.GetLibrary(ImageLibraryName)
                Dim libItems As IList
                libItems = [lib].GetItems()
                Randomize(libItems)
                lvCycleSlideshow.DataSource = libItems
                AddHandler lvCycleSlideshow.ItemDataBound, AddressOf lvCycleSlideshow_ItemDataBound
                lvCycleSlideshow.DataBind()
            End If
        End Sub
        Private Shared Sub Randomize(ByVal list As IList)
            Dim rng As Random = New Random
            Dim i As Integer = (list.Count - 1)
            Do While (i > 0)
                Dim swapIndex As Integer = rng.Next((i + 1))
                If (swapIndex <> i) Then
                    Dim tmp As Object = list(swapIndex)
                    list(swapIndex) = list(i)
                    list(i) = tmp
                End If
                i = (i - 1)
            Loop
        End Sub
     
        Protected Sub lvCycleSlideshow_ItemDataBound(ByVal sender As Object, ByVal e As ListViewItemEventArgs)
            Dim image As Image = TryCast(e.Item.FindControl("na"), Image)
            If image IsNot Nothing Then
                Dim contentItem As IContent = TryCast(e.Item.DataItem, IContent)
                image.AlternateText = contentItem.GetMetaData("AlternateText")
                image.ToolTip = contentItem.GetMetaData("AlternateText")
            End If
        End Sub
    End Class


    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  5. Scott Rozman
    Scott Rozman avatar
    93 posts
    Registered:
    10 Oct 2012
    24 Sep 2010
    Link to this post
    I'm now seeing my tooltips again, thanks!

    (Once I pulled out the original Evals from the ItemTemplate....)
Register for webinar
5 posts, 2 answered