Announcement

Collapse
No announcement yet.

Bug: "#" in product reference breaks New Products list.

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

    Bug: "#" in product reference breaks New Products list.

    BUG

    Using 8.0.3. If you have an "#" in the product reference, this breaks the New Products list (and possibly other links Related, etc) that go via the SearchScript).

    DEMO

    To see this fault make a product with a # in the reference, put it in the New Products list and you'll get an error message if you try to follow the "find out more" link in the New Products list on the generated page.

    REASON

    Actinic should be URL encoding the product reference when it's used in such links and it isn't.

    WORKAROUND

    Luckily we have so much control in V8 that we can fix this ourselves.

    The line in the New Products list that generates the link is
    Code:
          <a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<actinic:variable name="ProductReference" />&amp;NOLOGIN=1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<actinic:variable name="ShopID" /></actinic:block>">find out more</a></p>
    and we can replace it with

    Code:
          <a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<actinic:block php="true">echo urlencode('<actinic:variable name="ProductReference" encoding="perl" selectable="false" />');</actinic:block>&amp;NOLOGIN=1<actinic:block if="%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e">&amp;SHOP=<actinic:variable name="ShopID" /></actinic:block>">find out more</a></p>
    NOTES

    This just fixes the New Products list and will need repeated elsewhere that such links are used.

    If I search the Library / Layouts for <a href="<actinic:variable name="SearchCGIURL" />?PRODREF=<Actinic:Variable Name="ProdRef"/>&amp;NOLOGIN=1 there are a lot of such entries.
    Norman - www.drillpine.biz
    Edinburgh, U K / Bitez, Turkey

    #2
    Hi Norman,

    Quickly raised!! - well done

    Just a very quick question, - would this code have to be replaced for every new item that uses this # in the product reference, or is it a general code that lies in the main area?
    (With possibly 300+ HP products - each using # in the product ref, it would take a huge amount of code insert!)



    Just a thought!

    Cheers to you for the help.
    www.elitex.co.uk - Computer hardware, peripherals and components.

    Comment


      #3
      No. You're fixing Actinic by altering a Layout, so every product will automatically be fixed. However this fix would need to be applied to all New Product Lists layouts and all Related Product Lists layouts (or at least all the ones you use).

      PS it would be better to talk about this in your own thread and not this bug report.
      Norman - www.drillpine.biz
      Edinburgh, U K / Bitez, Turkey

      Comment


        #4
        Hi Norman

        Thanks for the report and the workaround. I have reported this to the team.

        Comment

        Working...
        X