Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sarah P 7 posts 27 karma points
    Nov 21, 2013 @ 07:29
    Sarah P
    0

    Help Pls with "Resources Listing" node

    I am using Umbraco v 4.7.0 (Assembly version: 1.0.4090.38017) and this is a website I have inherited. We have a "Resources Listing" node/document type and the content isn't showing correctly. The site was set up by professionals and they have not given us the admin password.

    When you go to the webpage, on the site the year of the latest document added shows, but it doesn't show the actual content. Umbraco has been set up so that any documents created in that folder automatically get filed by year/month (so new documents go in as 2013/11/filename. The website did update to show the current year when I created new content, but does not show the month or the filename. 

    As far as I can see, all the properties are set correctly and each level has been set to "published" but no matter what I do, I can't get this node to show any content. 

    Please help! Any suggestions as to how to fix/troubleshooting would be awesome. 

    Sarah

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Nov 21, 2013 @ 08:22
    Jeavon Leopold
    0

    Hi Sarah,

    I'm afraid it's pretty hard to help with your specific issue without seeing the code that is being used, so the first step is to get you admin access. To do this you will need access to the umbracoUser table in the database, can you get that? Once you can edit the umbracoUser table, copy the encrypted password from your user and overwrite the password of the admin user, you will now be able to login as admin using your password and hopefully be able to get hold of the code used to work out what's going wrong.

    Jeavon

  • Sarah P 7 posts 27 karma points
    Dec 17, 2013 @ 07:18
    Sarah P
    0

    Sorry about the delay, Jeavon, but yay, just got the Admin access working now. Thank goodness!

    Here's the resources page. Logic tells me it has to be date related, but I'm not really qualified to venture an opinion. The only thing I have changed is the word "domain" in this line "Inherits="Domain.masterpages.ResourcesListing"

    =======================================

    <%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" CodeBehind="ResourcesListing.master.cs" Inherits="Domain.masterpages.ResourcesListing" %>
    <%@ Register tagPrefix="IA" tagName="ArticlesNav" src="/usercontrols/ArticlesNav.ascx" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolder" runat="server">

    <div class="bannerSub">
        <div class="h1Container"><h1><umbraco:Item field="title" runat="server" useIfEmpty="pageName"></umbraco:Item></h1></div>    
      <umbraco:Macro runat="server" Alias="ShowBanner" imageWidth="960" imageHeight="98" mediaId="[$bannerImage]" />
    </div>

      <div class="containerContent" id="Top">
        <div class="containerContentLeftSub">  


        <div class="side-navigation">
          <IA:ArticlesNav ID="articleNav" runat="server" />
        </div>
        <div class="listing-content">
          <asp:Repeater runat="server" ID="newsRepeater">
            <ItemTemplate>
              <asp:PlaceHolder runat="server" Visible="<%# (Container.ItemIndex != 0) %>"><hr/></asp:PlaceHolder>
              <h2><%# Eval("Title"%></h2><p><%# Eval("Date"%<%# Eval("Desc"%></p><p><href="<%# Eval("Link") %>">Read more</a></p>
            </ItemTemplate>
          </asp:Repeater>

          <asp:Literal runat="server" ID="noResultsFoundMessage" />
        </div>



        </div>
        <div class="containerContentRightSub">


        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="greenPodSub" podTitle="[$greenPodTitle]" podText="[$greenPodText]" podLink="[$greenPodLink]" />

        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="yellowPodSub" podTitle="[$yellowPodTitle]" podText="[$yellowPodText]" podLink="[$yellowPodLink]" />
        
        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="bluePodSub" podTitle="[$bluePodTitle]" podText="[$bluePodText]" podLink="[$bluePodLink]" />

        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="pinkPodSub" podTitle="[$pinkPodTitle]" podText="[$pinkPodText]" podLink="[$pinkPodLink]" />

        </div>
      </div>


     
    </asp:Content>

    =====================================

    Thanks any one for reading over my query! 

    :) 

     

    Sarah 

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 17, 2013 @ 10:11
    Jeavon Leopold
    0

    Hi Sarah,

    Glad you've managed to get admin access!

    It looks like the logic driving this is contained in a usercontrol and also in codebehind the masterpage.

    Within the masterpages folder on the file system do you have the ResourcesListing.master.cs file? (It may have been compiled so might not be there)

    Additionally, could you post the contents of /usercontrols/ArticlesNav.ascx (similar to the above, can you also check if you have /usercontrols/ArticlesNav.ascx.cs)

    Jeavon

  • Sarah P 7 posts 27 karma points
    Dec 18, 2013 @ 02:39
    Sarah P
    0

    Master file of resources listing: 

    (No changes) 

    ================

    <%@ Master Language="C#" MasterPageFile="~/masterpages/Master.master" AutoEventWireup="true" CodeBehind="ResourcesListing.master.cs" Inherits="ImmunisationAlliance.masterpages.ResourcesListing" %>
    <%@ Register tagPrefix="IA" tagName="ArticlesNav" src="/usercontrols/ArticlesNav.ascx" %>

    <asp:Content ContentPlaceHolderID="ContentPlaceHolder" runat="server">

    <div class="bannerSub">
        <div class="h1Container"><h1><umbraco:Item field="title" runat="server" useIfEmpty="pageName"></umbraco:Item></h1></div>    
      <umbraco:Macro runat="server" Alias="ShowBanner" imageWidth="960" imageHeight="98" mediaId="[$bannerImage]" />
    </div>

      <div class="containerContent" id="Top">
        <div class="containerContentLeftSub">  


        <div class="side-navigation">
          <IA:ArticlesNav ID="articleNav" runat="server" />
        </div>
        <div class="listing-content">
          <asp:Repeater runat="server" ID="newsRepeater">
            <ItemTemplate>
              <asp:PlaceHolder runat="server" Visible="<%# (Container.ItemIndex != 0) %>"><hr/></asp:PlaceHolder>
              <h2><%# Eval("Title"%></h2><p><%# Eval("Date"%<%# Eval("Desc"%></p><p><href="<%# Eval("Link") %>">Read more</a></p>
            </ItemTemplate>
          </asp:Repeater>

          <asp:Literal runat="server" ID="noResultsFoundMessage" />
        </div>



        </div>
        <div class="containerContentRightSub">


        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="greenPodSub" podTitle="[$greenPodTitle]" podText="[$greenPodText]" podLink="[$greenPodLink]" />

        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="yellowPodSub" podTitle="[$yellowPodTitle]" podText="[$yellowPodText]" podLink="[$yellowPodLink]" />
        
        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="bluePodSub" podTitle="[$bluePodTitle]" podText="[$bluePodText]" podLink="[$bluePodLink]" />

        <umbraco:Macro runat="server" Alias="ShowPod" podCssClass="pinkPodSub" podTitle="[$pinkPodTitle]" podText="[$pinkPodText]" podLink="[$pinkPodLink]" />

        </div>
      </div>


     
    </asp:Content>

    ========================

  • Sarah P 7 posts 27 karma points
    Dec 18, 2013 @ 02:44
    Sarah P
    0

    I'm not finding /usercontrols/ArticlesNav.ascx.cs in the master templates folder. Maybe I am looking in the wrong place? I can't see it anywhere else either. 

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Dec 18, 2013 @ 08:24
    Jeavon Leopold
    0

    Hi Sarah,

    It would be in the usercontrols folder at the root level so not in templates. However you are looking for .cs files in both the masterPages and usercontrols folders.

    I suspect that your developer has actually compiled the .cs files into a single .dll file in your bin folder. Unfortunately this means that you don't have access to the source code.

    There a couple of options,

    1. You could ask the developer for the original solution containing all source code (recommend option)
    2. It might be possible for someone else to decompile and recreate the source code
    3. The logic might be able to be recreated as a Razor macro

    Jeavon

  • Sarah P 7 posts 27 karma points
    Jan 24, 2014 @ 04:21
    Sarah P
    0

    Hi Jeavon, 

    I found this, does this help at all? Is there anything broken in this file? 

    homepagelatestnews.xslt

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet 
      version="1.0" 
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:xsltHelper="urn:xsltHelper" 
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets xsltHelper ">


    <xsl:output method="html" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:template match="/">
      <xsl:variable name="newsArticles" select="$currentPage/ancestor-or-self::root//* [name() = 'NewsArticle']" />
      <xsl:choose>
        <xsl:when test="$newsArticles">
        <div class="containerContentRightTopbox">
          <h1 class="homeNewsHeading">news</h1>
        </div>
        <xsl:for-each select="$currentPage/ancestor-or-self::root//* [name() = 'NewsArticle']">
        <xsl:sort select="umbraco.library:FormatDateTime(articleDate, 'yyyyMMddhhmmss')" data-type="number" order="descending" />
        
          <xsl:if test="position() &lt;= 2">
            <div class="containerContentRightNewsItem">
              <h2><xsl:value-of select="title" /></h2>
              <p>
              <!--<xsl:value-of select="xsltHelper:StripandTruncate(bodyText,30)" />-->
              <xsl:value-of select="umbraco.library:TruncateString(./bodyText, number(80), '...')" disable-output-escaping="yes" />
              </p>
              <p><href="{umbraco.library:NiceUrl(@id)}">+ Read more</a></p>
            </div>
          </xsl:if>
        </xsl:for-each>
        </xsl:when>
        <xsl:otherwise>
        </xsl:otherwise>
      </xsl:choose>
    </xsl:template>

    </xsl:stylesheet>

     

Please Sign in or register to post replies

Write your reply to:

Draft