Copied to clipboard

Flag this post as spam?

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


  • Paul Sørensen 304 posts 650 karma points
    Sep 01, 2010 @ 21:52
    Paul Sørensen
    0

    Problems working with uForum

    Hi

    I have just installed uForum 1.0beta in my 4.5.1 Umbraco installation without any errors that I know of.

    I can create a forum but I don't see any option to create a topic or do anything when I'm logged in as a user.

    What am I missing?

    Thanks

    Paul S

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 02, 2010 @ 23:51
    Morten Bock
    0

    Hi Paul

    Are you logged in as a user or a member?

    The forum node has a "Allow new topics" checkbox. Make sure that it is checked.

    Also look at the two textfields. They define which membergroups are allowed to create topics and so on in the forum. And as var as I recall, you can enter "Everyone" to let all logged in members create topics. (check the description text for the field)

    Hope this helps. Otherwise, let me know.

  • Paul Sørensen 304 posts 650 karma points
    Sep 03, 2010 @ 21:48
    Paul Sørensen
    0

    Hi Morten

    I'm logged in as a user. I have checked the 'Allow new topics' checkbox. I have set the Allow post Groups to Authorized as stated in the description to allow all members to add new posts. I have set the same value in the Admin groups.

    After your post I have tried with Everyone, but it made no difference. I'm not able to do anything as a user except Log out.

    /Paul S

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 03, 2010 @ 22:28
    Morten Bock
    0

    "Authorized" sounds right.

    A "user" in umbraco terms is a backend user, such as an editor. A "member" is a frontend user that is logged in to the site.

    uForum only authorizes using "members". But it does sound like you are logged in as a member, since you can see a logout button.

    In the uForum-TopicsList.xslt file, you can see this code:

    <xsl:choose>
            <xsl:when test="uForum:CanPost()">
              <div class="infoBox" id="newTopic">
                <a href="{uForum:NicePostingUrl($currentPage/@id)}">Create a new topic</a>
                <br/>
                <small>Create a new topic in this forum</small>
              </div>
            </xsl:when>
            <xsl:otherwise>
              <div class="infoBox" id="newTopic">
                <span>You cannot post</span>
                <br/>
                <small>You do not have permission to post in this forum</small>
              </div>
            </xsl:otherwise>
    </xsl:choose>

    So i should show either the "create new topic" or the "you do not have permission" message.

    Only reason it would not, is if this is not true:

    <xsl:if test="number($currentPage/forumAllowNewTopics) = 1">

    You could try and do a 

    <xsl:value-of select="$currentPage/forumAllowNewTopics"/>

    at the top of that macro, to test what to value actually is. Maybe there is a bug in that logic.

  • Paul Sørensen 304 posts 650 karma points
    Sep 04, 2010 @ 22:40
    Paul Sørensen
    0

    Hi Morten

    This returns nothing:
    #<xsl:value-of select="$currentPage/forumAllowNewTopics"/>

    This returns 1:
    <xsl:value-of select="$currentPage/data [@alias='forumAllowNewTopics']/text()"/>

    /Paul S

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 04, 2010 @ 23:31
    Morten Bock
    1

    Ahh, looks like you are using the legacy xml schema in umbraco 4.5.1?

    In that case you will probably need to modify the xslt files to match the old schema.

  • Paul Sørensen 304 posts 650 karma points
    Sep 04, 2010 @ 23:35
    Paul Sørensen
    0

    Okay - I'll do that

    Thanks Morten
    /Paul S

  • Paul Sørensen 304 posts 650 karma points
    Sep 05, 2010 @ 09:00
    Paul Sørensen
    0

    Hi Morten

    You don't by any chance have an old version of the xlst before they were translated into the new schema. I don't have trained XSLT eyes.

    /Paul S

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 05, 2010 @ 09:27
    Morten Bock
    0

    The thing is that the logic was changed together with the change to the new schema, so I don't have a version that supports the old schema currently.

    I have a long train ride tonight, so I might take a look at it then. Should not be too difficult to translate back to the old schema.

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 05, 2010 @ 22:47
    Morten Bock
    0

    Looks like that is actually the only line that needs to be changed:

    <xsl:if test="number($currentPage/forumAllowNewTopics) = 1">

    to

    <xsl:if test="number($currentPage/data [@alias='forumAllowNewTopics']) = 1">

  • Paul Sørensen 304 posts 650 karma points
    Sep 05, 2010 @ 23:14
    Paul Sørensen
    0

    Meanwhile I upgraded to 4.5.2 and my old XSLT script still worked although I didn't set the UseLegacyXmlSchema - and uForum didn't - so I made the change and now it's working

    Thanks again
    Paul S

  • Paul Sørensen 304 posts 650 karma points
    Sep 06, 2010 @ 20:48
    Paul Sørensen
    0

    Hi

    When I create a topic I get this

    Page not found

    No umbraco document matches the url 'http://vgc.dk/admin/baneoplaeg/generelt/3-Just-another-comment.aspx'

    umbraco tried this to match it using this xpath query'/root/*/* [@urlName = "admin"]/* [@urlName = "baneoplaeg"]/* [@urlName = "generelt"]/* [@urlName = "3-just-another-comment"]')

    This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

     

    but it's in the list. But when I click on the comment I get this:

    Page not found

    No umbraco document matches the url 'http://vgc.dk/admin/baneoplaeg/generelt/3-Just-another-comment.aspx'

    umbraco tried this to match it using this xpath query'/root/*/* [@urlName = "admin"]/* [@urlName = "baneoplaeg"]/* [@urlName = "generelt"]/* [@urlName = "3-just-another-comment"]')

    This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

     

    So I must still be missing something

    /Paul S

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 06, 2010 @ 22:59
    Morten Bock
    0

    The displaying of topics should be handled by a 404 handler in the /config/404handlers.config file. Could you check that there is a uForum related handler in there?

  • Paul Sørensen 304 posts 650 karma points
    Sep 07, 2010 @ 08:47
    Paul Sørensen
    0

    Then 404handlers.config looks like this:

    <?xml version="1.0" encoding="utf-8"?>
    <NotFoundHandlers>
      <notFound assembly="umbraco" type="SearchForAlias" />
      <notFound assembly="umbraco" type="SearchForTemplate" />
      <notFound assembly="uForum" type="SearchForTopic" />
      <notFound assembly="umbraco" type="SearchForProfile" />
      <notFound assembly="umbraco" type="handle404" />
    </NotFoundHandlers>

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 07, 2010 @ 19:50
    Morten Bock
    0

    It looks like you are still having issues with the cache being in the old format. 

    Are you working directly on a production site? You should really be doing this sort of debugging on a local dev server. Especially when switching back and forth between xml formats!

    The SearchForTopic handler currently looks at the node name (in your case "node"), and since that is not the expected nodetype ("uForum"), then it does not find what it is looking for, and does not handle the url.

    So in order to get uForum working, you will need to get you cache cleared, probably by publishing all your nodes and doing a Republish Entire Site. But be ware! This much break the rest of the site, so I would strongly encourage you to get a dev version up and running to do this stuff on.

  • Paul Sørensen 304 posts 650 karma points
    Sep 07, 2010 @ 22:17
    Paul Sørensen
    0

     

    On my local copy I have now publish the whole site without any changes. I have also downloaded the source and the node name is indeed node instead of uForum in the SearchForTopicHandler.

    Anything else I could try?

  • Paul Sørensen 304 posts 650 karma points
    Sep 07, 2010 @ 22:36
    Paul Sørensen
    0

    Is there a problem in doing this:

     

     

     

    //if (urlNode != null && topicId != "" && urlNode.Name == ContentProperties.ForumDocumentTypeAlias)

     

    if (urlNode != null && topicId != "" && urlNode.Attributes.GetNamedItem("nodeTypeAlias").Value == ContentProperties

    .ForumDocumentTypeAlias)

    ?

  • Morten Bock 1867 posts 2140 karma points MVP 2x admin c-trib
    Sep 07, 2010 @ 23:13
    Morten Bock
    0

    Well, the problem is that then the code will break when the xml eventually changes to the new format (since the noteTypeAlias attribute does not exist there).

    But you might get away with mixing the two. 

    if (urlNode != null 
        && topicId != "" 
        && (urlNode.Name == ContentProperties.ForumDocumentTypeAlias
            || urlNode.Attributes.GetNamedItem("nodeTypeAlias").Value == ContentProperties.ForumDocumentTypeAlias))
    
    I will see if I can get the package in general to work better with both schemas in the future.
  • Paul Sørensen 304 posts 650 karma points
    Sep 07, 2010 @ 23:27
    Paul Sørensen
    0

    Yes - I did that after posting - good idea to make it work with both schemas

Please Sign in or register to post replies

Write your reply to:

Draft