Announcement

Collapse
No announcement yet.

Bug: ListCount variable is erratic within Product Lists

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bug: ListCount variable is erratic within Product Lists

    Bug seen on 8.5.1.HIZA and 8.5.2.HMVA using Demo site.

    ListCount variable is erratic within Product Lists.

    If I add the following to a Product List layout (e.g. Product List With Horizontal Dividers).

    ListIndex: <actinic:variable name="ListIndex" />, ListCount: <actinic:variable name="ListCount" />

    And look in the Books section (3 products).

    I'd expect a display like

    ListIndex: 1, ListCount: 3
    <product 1 details>
    ListIndex: 2, ListCount: 3
    <product 2 details>
    ListIndex: 3, ListCount: 3
    <product 3 details>


    But I get

    ListIndex: 1, ListCount: 2
    <product 1 details>
    ListIndex: 2, ListCount: 2
    <product 2 details>
    ListIndex: 3, ListCount: 2
    <product 3 details>


    Or even

    ListIndex: 1, ListCount: 0
    <product 1 details>
    ListIndex: 2, ListCount: 0
    <product 2 details>
    ListIndex: 3, ListCount: 0
    <product 3 details>


    On the same Section, depending on what else I've been doing!

    Try it by adding the bit of code above. Then switch to the Content tab and click on any of the Sections. The Page Preview display will probably show a ListCount that isn't correct (it should match the number of items shown). Try clicking on the New Products (empty) section and then on the Stationery (3 Products). Bet you get a ListCount of 0.

    What seems to be happening is that ListCount is being taken from the previous Section that was selected.

    This is sometimes OK on full Previews and Uploads but I have seen many cases where the wrong value was used.

    I've attached 2 screenshots that show the same Section with two different (and wrong) ListCounts showing. All I did was click elsewhere in the Content Tree then return to the same Section.
    Attached Files
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    You are quite right Norman - there is a caching issue with the ListCount value. It seems to be OK upload and offline preview, but the internal preview is affected. I'll report a bug.

    Comment


      #3
      It's quite serious. I'm seeing it on online pages and full Previews as well. Screenshot of server-side page attached.
      Attached Files
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        this explains why some more interesting php scripts i'v made, related to these values are also out of whack. Thanks for the heads up norm, and hope this can be fixed soon.

        Comment


          #5
          Hmmm - maybe not related but would it affect the number of products added to a cart. I have just seen a site where items added to a cart are being doubled when the cart is viewed?

          Comment


            #6
            Malcolm,

            I don't think this would affect Add to Cart.

            The problem would manifest itself in weird code on the generated site and we'd be able to eyeball that for errors.

            It's more likely to trip up coders (e.g. do something special before the last product on a section).

            I was writing a big patch that uses Fragments after a Product to create a tabbed display, each tab coming from a Fragment but being held in an external file and pulled in by XMLHTTP only when needed. A way of getting a huge amount of optional content onto a page without ridiculous load times. I was seeing bizarre results and only after sticking in some diagnostic code did I see that ListCount was misbehaving.
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              contents of the carts can go up just by hitting the refresh button immediately after adding - its not this thats causing the problem is it?

              Comment


                #8
                Sorry. I know this has been a long time since the last post, but I was wondering if there has been any resolution to this issue. I am seeing it in version 9.0.5 in the offline preview, internal preview and publish.

                Thanks.

                Comment

                Working...
                X