Fixed alert_user_trophy template missing from XF 2.1

vicos

Member
Affected version
2.1
I just went live with XF 2.1 this weekend. The path I used to get there was vB4.2-->XF1.5-->XF2.1

I am seeing the following error on an ongoing basis in the syslog:

Template error: Template public:alert_user_trophy is unknown

I checked with my 3rd party AddOn dev, and he said this was a XF template.

I ordered a demo setup from your site to confirm if it was in a fresh XF 2.1 install and I don't see it there either.

I checked my test site which is running XF 2.0 and it is in there.

This is what is in XF 2.0:

Code:
{{ phrase('you_have_been_awarded_a_trophy_x', {
    'trophy': '<a href="' . link('members/trophies', $xf.visitor) . '" class="fauxBlockLink-blockLink">' . $trophy . '</a>'
}) }}

Is this same as for XF 2.1? If not, can someone provide the 2.1 code so I can create the template.

Thank you!
 
This is actually a bug in XF 2.0 technically.

We no longer use the alert_user_trophy template in XF 2.0 but we didn't delete it. We did delete it in XF 2.1 but presumably these trophies were awarded while XF 1.5 was still running.

The XF 2.0 upgrade should have run this query:
SQL:
UPDATE xf_user_alert
SET content_type = 'trophy', action = 'award'
WHERE content_type = 'user' AND action = 'trophy'
If you can run that yourself, that would be the recommended course of action rather than changing templates.
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
Update user/trophy alerts to trophy/award in new XF 2.1 upgrades. We started using trophy/award in XF 2.0 but missed updating the alerts because the template was still there until its removal 2.1.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
This is actually a bug in XF 2.0 technically.

We no longer use the alert_user_trophy template in XF 2.0 but we didn't delete it. We did delete it in XF 2.1 but presumably these trophies were awarded while XF 1.5 was still running.

The XF 2.0 upgrade should have run this query:
SQL:
UPDATE xf_user_alert
SET content_type = 'trophy', action = 'award'
WHERE content_type = 'user' AND action = 'trophy'
If you can run that yourself, that would be the recommended course of action rather than changing templates.
This is the same fix needed for XF 2.1.0 also?
Thanks!

The XF 2.0 upgrade should have run this query
I just did my Live Forum upgrade from 1.5 now, not sure why this isn't run.
 
This is the same fix needed for XF 2.1.0 also?
We're not making any further updates to XF 2.0 and technically there are no adverse effects until XF 2.1 anyway so we are only applying it to new XF 2.1 upgrades (meaning if you've already upgraded from XF 1.5, you'll need to apply it manually).

I just did my Live Forum upgrade from 1.5 now, not sure why this isn't run.
The code wasn't there in XF 2.0 which is mostly what the bug was.
 
Technically speaking you did upgrade to 2.0 you just wouldn't know about it. When you upgrade, you pass through every single version we've released.

The trophies would have been inserted in the brief period of time you were running XF 1.5. These trophy alerts were sent with the user content type and the trophy action.

From XF 2.0 onwards we started sending trophy alerts with the trophy content type and the award action. In the XF 2.0 upgrade script we should have included the MySQL query I posted above, but we neglected to do so.

That is the bug. Plus we should have also removed the alert_user_trophy template because it was no longer being used, but we didn't remove it until XF 2.1. That is why the issue is only becoming apparent now.

We have fixed this for anyone who newly upgrades to XF 2.1 by including the MySQL query I posted above in the XF 2.1 upgrade script.
 
We have fixed this for anyone who newly upgrades to XF 2.1 by including the MySQL query I posted above in the XF 2.1 upgrade script.
So then what is the recommended course of action when having upgraded from XF 1.5 to XF 2.1 already?

Should I run the query or wait until XF 2.1.1?
 
Top Bottom