OrchardCMS / Orchard

Orchard is a free, open source, community-focused Content Management System built on the ASP.NET MVC platform.
https://orchardproject.net
BSD 3-Clause "New" or "Revised" License
2.37k stars 1.12k forks source link

tag cloud buckets not recognised 1.8 #4439

Open orchardbot opened 10 years ago

orchardbot commented 10 years ago

edikaufmann created: https://orchard.codeplex.com/workitem/20610

Wiki Link: [discussion:541393] this happened after migrating from 1.7.1/2 to 1.8

My 'Tag Cloud Widget' defines 5 buckets. However, the classes are NOT set accordingly! I.e. all classes are set to one (1):

  • (see below). The cloud is built correctly and, when clicking, shows the correct number of objects (number: being the count of a specific term). Hence, the same font-size is used for all cloud members (see below) PS: since the cloud as such works it's not a high priority issue! ed /\* TagCloud \* / ul.tag-cloud { list-style: none } li.tag-cloud-tag { display: inline; } .tag-cloud-tag a { border: none} .tag-cloud-tag-1 { font-size: 1em; } .tag-cloud-tag-2 { font-size: 1.3em; } .tag-cloud-tag-3 { font-size: 1.6em; } .tag-cloud-tag-4 { font-size: 1.9em; } .tag-cloud-tag-5 { font-size: 2.2em; } / End TagCloud /
  • orchardbot commented 10 years ago

    edikaufmann commented:

    also, after some further testing: it seems that I can't use the slug to confine the cloud to a certain ContentItem. As the slug I use the 'ContentItem' name.

    orchardbot commented 10 years ago

    BuzzKeith commented:

    also, after some further testing: it seems that I can't use the slug to confine the cloud to a certain ContentItem. As the slug I use the 'ContentItem' name.

    This is due to line 59 in TagCloudService.cs:

                                .Select(x => x.Id)

    which I reckon should read :

                                .Select(x => x.ContentItemRecord.Id)
    orchardbot commented 10 years ago

    Glyn commented:

    Has there been any progress fixing the bucket count bug?

    If not, please point me in the right direction and I'll patch my site code as a make-do until an official release which fixes it is out.

    orchardbot commented 10 years ago

    Glyn commented:

    Here's where the naughty code lives, in TagCount.cs (Modules\Orchard.Tags) which explains why tags always get assigned to bucket one.

    namespace Orchard.Tags.Models {
        public class TagCount {
            public TagCount() {
                Bucket = 1;
            }
    
            public string TagName { get; set; }
            public int Count { get; set; }
            public int Bucket { get; set; }
        }
    }
    
    orchardbot commented 10 years ago

    @sebastienros commented:

    I think it's fixed, we use it on weblogs.asp.net without any issue. Have you tried the 1.8.x branch ?

    orchardbot commented 10 years ago

    Glyn commented:

    I'm using the Orchard.Web.1.8.zip (March 29th) from the download page.

    Is there a more recent build somewhere with a fully functional tag cloud? If there is, would you post a link to it please?

    orchardbot commented 10 years ago

    @sebastienros commented:

    You can use this link: http://teamcity.codebetter.com/viewLog.html?buildId=122608&tab=artifacts&buildTypeId=bt630#!hua92z7h

    orchardbot commented 10 years ago

    Glyn commented:

    Thanks for the link.

    Now I just need to get my head around using Orchard as a project rather than just as a product. Time for more coffee me thinks... :-)

    orchardbot commented 9 years ago

    @j3ffb commented:

    I submitted a pull request for the Slug issue https://orchard.codeplex.com/SourceControl/network/forks/j3ffb/royalvetcollege/contribution/7858

    orchardbot commented 9 years ago

    @agriffard commented:

    Is it fixed now that the pull request has been integrated in 1.8.x? https://orchard.codeplex.com/workitem/21124