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

Not a Bug XenForo 1.1 / 1.2 cache rebuild compatibily

Discussion in 'Resolved Bug Reports' started by cclaerhout, Jun 29, 2013.

  1. cclaerhout

    cclaerhout Well-Known Member

    The title is not great, sorry. When you install an addon on XenForo 1.1.x that uses the callback xen tag (XenForo 1.2.x) in the templates, it doesn't really like it very much: It prevents the templates to be rebuilt with this message:
    PHP:
    Line 3Unknown tagcallback
     
    Chris D likes this.
  2. Chris D

    Chris D XenForo Developer Staff Member

    Ideally that will be sorted out.

    I have solved backwards compatibility by putting conditionals around stuff I know is incompatible.

    It might not work in this example, but I've used:

    Code:
    <xen:if is="{$xenOptions.currentVersionId} >= 1020031">
    // 1.1 incompatible stuff here
    </xen:if>
     
    cclaerhout likes this.
  3. Mike

    Mike XenForo Developer Staff Member

    It won't be worked out and it can't really be - it's a new syntax in 1.2 so by definition it won't be backported. If you want to take advantage of new features (particularly anything that runs at compile time), you'll need to branch for 1.2.
     
    xf_phantom likes this.
  4. cclaerhout

    cclaerhout Well-Known Member

    The conditional will be enough to prevent the error during the cache rebuild ?
     
  5. cclaerhout

    cclaerhout Well-Known Member

    I didn't want to use the 1.2 syntax on 1.1 but just to prevent this error to display for users of 1.1.
     
  6. Chris D

    Chris D XenForo Developer Staff Member

    Probably not. But it's just an example of something that could be used if you get other compatibility issues.
     
  7. cclaerhout

    cclaerhout Well-Known Member

    Nope this is not enough. I will have to do two installers then.
     
  8. Jon W

    Jon W Well-Known Member

    @Mike, to avoid this problem in future releases (1.3, etc.), perhaps it would be worthwhile adding something to XenForo 1.2 such that @Chris Deeming's bit of code would actually work? I imagine the likelihood of even more template syntax being added in 1.3 etc. is quite high.
     
  9. Jeremy P

    Jeremy P Well-Known Member

    Unrecognized tags should just be silently ignored.. no? I don't see the drawback.
     
    pegasus and Jon W like this.
  10. Chris D

    Chris D XenForo Developer Staff Member

    Thinking about it, if it could be silently ignored you could always just throw a template error in debug mode, such as what happens with invalid foreach loops, and others and undefined style properties etc.
     
    Jon W likes this.
  11. Jon W

    Jon W Well-Known Member

    Throwing an error when you are creating a template is useful. Throwing an error when you are installing an add-on, not so much.
     
    pegasus and Chris D like this.
  12. cclaerhout

    cclaerhout Well-Known Member

    When a new version comes with new xen tags, may be we could have an update of the n-1 version with a list of tags to apply a fallback that will lead to the "comment" xen tag. Now this is just theory, I haven't checked how the system "parse" these tags.
     
  13. tajhay

    tajhay Well-Known Member

    how do we fix this if this is not a bug?

    I am using @Chris Deeming 's addon installer and when i try to update addons i am getting this error. It seems that one of the addons i tried to update had this issue and is now affecting my ability to update any others as it simply triggers this error. Any ideas chris?
     
  14. Jon W

    Jon W Well-Known Member

    Check to see if any of the add-ons you are trying to update only support XenForo 1.2. If that is the case, you won't be able to update it without first upgrading to XenForo 1.2 Beta (not recommended on a production site).
     
  15. tajhay

    tajhay Well-Known Member

    thanks @Waindigo ill give it a go by disabling some of the recent addons i had updated and see if that fixes it.
     
  16. tajhay

    tajhay Well-Known Member

    ok i have disabled most of the addons and then tried to rebuild the templates but i still get the Line 3: Unknown tag: callback bug. Is it because the tag is stored in a cache or something? @Chris Deeming or @Waindigo any ideas?
     
  17. Chris D

    Chris D XenForo Developer Staff Member

    Nothing to do with my add on. This would have happened during normal installs as well.

    If you work out which add on added xen callback tag to your template you should be able to uninstall it.

    Alternatively you could see if it does actually exist in your templates by searching for xen:callback and then deleting that template or removing the xen callback line from it.
     
    tajhay likes this.
  18. tajhay

    tajhay Well-Known Member

    thanks so much chris! it was the bb code manager is anyone else was interested in it.
     
  19. cclaerhout

    cclaerhout Well-Known Member

    The "important" section of the update was not there only for decoration. I will look to get rid of that callback method to use another solution to continue to have only one xml file.
     
    tajhay likes this.
  20. tajhay

    tajhay Well-Known Member

    Totally agree. It was definitely my fault as I overlooked it.
     

Share This Page