Okay
  Public Ticket #1675521
Items lose content of thumbnail variables after editing
Closed

Comments

  • Georg Weisz started the conversation

    Hi. We are using Unlimited Addons for a project and we think we discovered a bug. To reproduce:

    1. Create a new Addon with Items
    2. Add an "image" variable to the Item HTML
    3. Add a thumbnails variable (eg. {{ item.image_thumb }}) to the Item HTML
    4. Save/update the Addon
    5. Use the Addon on any page with WPBakery page builder
    6. Add values for all variables and save 
    7. All works fine, as you would expect
    8. Go and edit any value of your Addon in WPBakery, save again
    9. Now all {{ item.image_thumb }} variables lost their values and simply produce empty strings

    This is a rather annoying bug which might prevent us from using Unlimited Addons for this client project. Thank you in advance for checking this out.


    Cheers, Georg

  • Georg Weisz replied

    For everyone running into the same issue – this is our current (dirty) workaround:

    {{item.image|replace({'.png':'-200x200.png', '.jpg':'-200x200.jpg'})}}

    We discovered Unlimited Addons uses Twig, so you can use pretty much all of Twig’s features – in this case the replace-filter: https://twig.symfony.com/doc/2.x/filters/replace.html



  •   Max replied privately
  •   Georg Weisz replied privately
  •   Max replied privately
  •   Max replied privately
  •   Georg Weisz replied privately