XF 2.0 Blocking template syntax error when installing a newer add-on on older XF

oksiak

Member
Hi :)
a few days ago by mistake I tried to install @Brad Padgett [BP] Light Switch and Style Chooser add-on, I'm using Xenforo 2.0 and the add-on I was mistakenly trying to install is for xenforo 2.1.

the add-on is not installed and an error has occurred Line 179: Unknown tag fa encountered.

@Brad Padgett contacted me in private messages and sent me some versions for xenforo 2.0 but unfortunately the add-ons he sent me do not work either.

Today when I wanted to install / update s9e Media Sites addon the same error has occurred :(
So I decided to check and tried to install other add-ons designed for xenforo 2.0 and unfortunately I can't install or even update any add-on because every time the same error occurs - Line 179: Unknown tag fa encountered.

Maybe someone knows how to solve this problem😭

Thank You :)
 
The error is due to you installing the 2.1 version on your 2.0.x install. It's a font awesome error because the 2.1.x version uses font awesome 5. But I do find it a bit strange you received the error again. You can try rebuilding your master data via /install and see if it fixes the issue. There's no other reason you were receiving that error other than the fact that you tried to install a 2.1.x version on 2.0.x and the reason I know this is because I've tested both versions on my local install and received the same error when doing the exact same thing.
 
If it helps anyone in assisting you I will mention that my 2.1 version of my add-on uses the new font awesome 5 syntax for developers where you using the fa tag such as this:

<xf:fa icon="fa-lightbulb" style="font-size: 34px; color: {{ property('fa_color_off') }};" />

The error is due to the new font awesome 5 tags for developers that I used in 2.1 and not in 2.0
 
How can I rebuild master data via /install?
What is the command?

You just go to your websites install page. And since there's nothing to install you can click "rebuild master data" after logging in which will basically do just that and rebuild your master data. That would probably fix the issue.
 
Unfortunately, after clicking Rebuild Master Data the error appears Line 179: Unknown tag fa encountered
I cannot Rebuild Master Data :(

This seems to be an issue with the Xenforo 2.1.x <xf:fa> tags for font awesome 5 affecting your 2.0.x install. That's what the error is for. Please post the entire error you've received in full so that others can find out what's going on. Thank you.
 
Entire error:
Line 179: Unknown tag fa encountered

I'm going to tag @Chris D for this one. My add-on does nothing to the database outside of Xenforo and there are no syntax errors in the add-on whatsoever. It's a simple template modification that creates a style chooser link between the switch and the chooser. Consider my above post about <xf:fa> as you wait on Chris. This could very well be some type of bug with the new font awesome syntax and the <xf:fa> tags.
 
The ultimate cause for this is that the add-on isn’t installable on XF 2.0 because it contains template tags that are only usable in XF 2.1. (This triggers a syntax error).

Ideally you would use your addon.json file to restrict installation to XF 2.1 and above.

The likelihood is that the only way to resolve this right now is to modify the database to essentially remove the XF:AddOnData job from the xf_job table which is likely queued and stuck and will likely stop subsequent jobs from running.

With that in mind @oksiak if you feel comfortable doing so, please remove this specific entry from your xf_job table. If you do not feel comfortable doing this, please submit a ticket from your customer area, and link to this particular post. Please also provide us with login details (for cPanel / phpMyAdmin or similar) and we’ll delete that entry for you.

I’ll also have to move this to bugs because we might need to do something to workaround this scenario. Obviously we can’t really retroactively fix it in 2.0 now but hopefully we can come up with something to reduce this scenario in future versions.
 
The ultimate cause for this is that the add-on isn’t installable on XF 2.0 because it contains template tags that are only usable in XF 2.1. (This triggers a syntax error).

Ideally you would use your addon.json file to restrict installation to XF 2.1 and above.

The likelihood is that the only way to resolve this right now is to modify the database to essentially remove the XF:AddOnData job from the xf_job table which is likely queued and stuck and will likely stop subsequent jobs from running.

With that in mind @oksiak if you feel comfortable doing so, please remove this specific entry from your xf_job table. If you do not feel comfortable doing this, please submit a ticket from your customer area, and link to this particular post. Please also provide us with login details (for cPanel / phpMyAdmin or similar) and we’ll delete that entry for you.

I’ll also have to move this to bugs because we might need to do something to workaround this scenario. Obviously we can’t really retroactively fix it in 2.0 now but hopefully we can come up with something to reduce this scenario in future versions.

I will update the add-on to only allow 2.1 in the next release. I'm currently working on a new release for UI.X 2 style compatibility and a couple other additions. I just scanned the dev docs and have now seen this is possible. I was not aware of this but at least you have a fix @oksiak

In the mean time I have a warning up on my add-on and you have my apologies for not knowing this would cause such an issue with those tags.
 
The ultimate cause for this is that the add-on isn’t installable on XF 2.0 because it contains template tags that are only usable in XF 2.1. (This triggers a syntax error).

Ideally you would use your addon.json file to restrict installation to XF 2.1 and above.

The likelihood is that the only way to resolve this right now is to modify the database to essentially remove the XF:AddOnData job from the xf_job table which is likely queued and stuck and will likely stop subsequent jobs from running.

With that in mind @oksiak if you feel comfortable doing so, please remove this specific entry from your xf_job table. If you do not feel comfortable doing this, please submit a ticket from your customer area, and link to this particular post. Please also provide us with login details (for cPanel / phpMyAdmin or similar) and we’ll delete that entry for you.

I’ll also have to move this to bugs because we might need to do something to workaround this scenario. Obviously we can’t really retroactively fix it in 2.0 now but hopefully we can come up with something to reduce this scenario in future versions.
Hi @Chris D :)
1.I created full forum backup in Direct Admin.
2.I deleted AddOnData job from the xf_job table.
ssssssssssssssss.webp


sssssssssssssssssss8.webp

3.Then I tried to update s9e Media Sites add-on
ssssssssssssssssssssssssssss2.webp

sssssssssssssssssssssssss4.webp


but the same error occurs :( Line 179: Unknown tag fa encountered

ssssssssssssssssssssssss5.webp
4.I have restored a copy of the forum.
 
After some testing, it seems as though the trouble you're running into here is actually something we fixed in XF 2.0.10:
If you can upgrade to 2.0.10, then that's what we'd recommend in the first instance.

If you are unable to do that then you will need to do a few things manually.

First of all follow the steps you did above to clear the AddOnData job.

Then run this query:
SQL:
DELETE FROM xf_template_modification
WHERE addon_id = 'BP/LSSC'

If an entry for the add-on BP/LSSC appears in the xf_addon table then this should be removed as well.

Hopefully that will sort it out.
 
Top Bottom