Support Trophies rebuild xenforo

gugol

Registered
hi all, i added some trophies and i rebuilt the cache, unfortunately the date of the trophies rebuild is not valid because it is not the original date when those posts were created. This is a pretty big problem that I can't find a solution to, the only solution for me is to redo the whole forum from scratch starting with creating trophies, right? Or do you have any solution to this problem? Thank you in advance.

xxx.png
 

Mohamm

Registered
hi all, i added some trophies and i rebuilt the cache, unfortunately the date of the trophies rebuild is not valid because it is not the original date when those posts were created. This is a pretty big problem that I can't find a solution to, the only solution for me is to redo the whole forum from scratch starting with creating trophies, right? Or do you have any solution to this problem? Thank you in advance.
Run these two queries:

Code:
TRUNCATE TABLE xf_user_trophy;
UPDATE xf_user AS u
SET u.trophy_points = (
    SELECT SUM(t.trophy_points)
    FROM xf_user_trophy AS ut
    LEFT JOIN xf_trophy AS t ON (t.trophy_id = ut.trophy_id)
    WHERE ut.user_id = u.user_id
);
That will make it so everyone gets their trophies awarded again.

Trophies are awarded by this cron, so you may wish to manually run the task after running these queries:

Admin CP -> Tools -> Cron Entries -> Update User Trophies -> Controls: Run

And note that the trophy cron only updates users who have been active in the last 24 hours, so there may be a delay for some users despite manually running the cron.
 

gugol

Registered
Run these two queries:

Code:
TRUNCATE TABLE xf_user_trophy;
UPDATE xf_user AS u
SET u.trophy_points = (
    SELECT SUM(t.trophy_points)
    FROM xf_user_trophy AS ut
    LEFT JOIN xf_trophy AS t ON (t.trophy_id = ut.trophy_id)
    WHERE ut.user_id = u.user_id
);
The new tool isn't the cron. It's under the rebuild caches section. It doesn't recalculate the exact date the posts were created unfortunately this method doesn't work!

Immagine 2023-03-02 081608.png
 
  • Tags
    trophies rebuild xenforo
  • Back
    Top Bottom