1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why might this template modification not work on all installations?

Discussion in 'XenForo Development Discussions' started by Chris D, Jun 23, 2013.

  1. Chris D

    Chris D XenForo Developer Staff Member

    OK. So this is, I thought, a pretty simple regular expression.

    Find: /<xen:if is="{\$birthdays}">(.*?)<\/xen:if>/is
    Replace: $0<xen:include template="member_list_block_newest" />

    It's very simply supposed to be including a template at the end of the {$birthdays} block (on the member_notable template).

    I am receiving various reports that suggest for some people it works, and other people it doesn't.

    So either I've overlooked something, or there could be some sort of bug that might need reporting.
     
  2. xIsabel38

    xIsabel38 Well-Known Member

    I obviously don't know anything about specific code and all that. I have no idea what that expression means to be truthful. But have you tried to see what is in common between all the people that can see it and all the people that can't? Usergroup or permission settings perhaps?
     
    Chris D likes this.
  3. Chris D

    Chris D XenForo Developer Staff Member

    Thank you.

    Think I have worked out it's an issue with PHP below version 5.4.
     
  4. xIsabel38

    xIsabel38 Well-Known Member

    Oh well in that case everything I said was wrong!
     
    Chris D likes this.
  5. DRE

    DRE Well-Known Member

    Would be awesome if it was a bd widget, problem solved.
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    Only if you want to use Widget Framework. Which not everyone does.

    I believe it's a XenForo bug that Mike fixed, but I can't find the thread.
     
    Shelley likes this.
  7. DRE

    DRE Well-Known Member

    Will it work even with bd widget installed?
     
  8. Shelley

    Shelley Well-Known Member

    Agreed. There's two widgets in the xfrocks frame i like but got a coder to develop two of the widgets because of that reason. I didn't want to use or rather install a full blown FW.
     
  9. Mike

    Mike XenForo Developer Staff Member

    There isn't a thread for the particular bug you're running into, but I noticed it yesterday and fixed it. (It hides the error as an invalid regex.)
     
    Adam Howard and Chris D like this.
  10. Chris D

    Chris D XenForo Developer Staff Member

    Is it only an issue on below PHP 5.4?
     
  11. Mike

    Mike XenForo Developer Staff Member

    Correct. (Same issue as what happened with route filters, if you're keeping score.)
     
    Adam Howard, Chris D and Dan like this.
  12. DRE

    DRE Well-Known Member

    Adam Howard likes this.
  13. Chris D

    Chris D XenForo Developer Staff Member

    I am. But you're still winning.
     
    Dan, Adam Howard and Mike like this.
  14. Adam Howard

    Adam Howard Well-Known Member

    Sometimes keeping backward compatibility is not always what its cracked up to be, eh?
     
  15. Jeremy

    Jeremy XenForo Moderator Staff Member

  16. Adam Howard

    Adam Howard Well-Known Member

    Last edited: Jun 24, 2013
  17. Brogan

    Brogan XenForo Moderator Staff Member

    Add-ons should work with the lowest version of PHP which XenForo supports, which is 5.2.4.

    Until that changes, if add-ons only work with PHP 5.4 and higher, they will not work on a lot of installations.
     
    Jeremy, RoldanLT and SneakyDave like this.
  18. Jeremy

    Jeremy XenForo Moderator Staff Member

    Not everyone has the option to update. Shared hosts really should provide upgrade paths.
     
    RoldanLT and SneakyDave like this.
  19. Robbo

    Robbo Well-Known Member

    I disagree. Add-ons should just be clear about which version they support. Mine are moving to 5.3+ as supporting 5.2 is time I don't have, it's like supporting IE 6 (which XenForo does, I don't).
     
    Adam Howard likes this.

Share This Page