• 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

cclaerhout

Well-known member
#1
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 3: Unknown tag: callback
 

Chris D

XenForo developer
Staff member
#2
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>
 

Mike

XenForo developer
Staff member
#3
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.
 

cclaerhout

Well-known member
#4
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>
The conditional will be enough to prevent the error during the cache rebuild ?
 

cclaerhout

Well-known member
#5
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.
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.
 

cclaerhout

Well-known member
#7
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>
Nope this is not enough. I will have to do two installers then.
 

Jon W

Well-known member
#8
@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.
 

Chris D

XenForo developer
Staff member
#10
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.
 

cclaerhout

Well-known member
#12
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.
 

tajhay

Well-known member
#13
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?
 

Jon W

Well-known member
#14
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).
 

tajhay

Well-known member
#16
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?
 

Chris D

XenForo developer
Staff member
#17
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

Well-known member
#18
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.
thanks so much chris! it was the bb code manager is anyone else was interested in it.