XF 2.2 Admin template mod not showing up in production?

kirsty

Member
I've got an admin template mod - adding extra settings to a forum as in https://xenforo.com/docs/dev/lets-build-an-add-on/#modifying-the-forum-edit-form - in an add-on and it works fine on my dev server but not on my production server.

  • I've used the same technique in a different add-on and that works fine on both servers
  • I've tried changing the find/replace text and the execution order so the values are different to the other add-on I wrote, but that also makes it work ok on dev and not in production.
  • The template_modifications.xml on the production server show the admin template mod looking the similar in both add-ons (different values, modification keys etc but same structure).
  • Admin template mods can't be viewed in the admin control panel on the production server so it can't have got disabled or overwritten (can it?)

Is there anything I can safely do to kick the production server into reloading the template mods for one add-on or something like that? Or any reason it might be ignoring it?
 
Do you have 1 on your production server for this modification?

If all has gone well, when you return to the template modifications list, you will see the log summary is displaying 1 / 0 / 0 therefore indicating that the modification successfully applied one time.
 
Since the production server isn't in dev mode it doesn't show the admin template mods in the control panel at all. They all work for other add-ons though.
 
Hmmm, digging into the xf_template_modification db on the production server shows that template mod as disabled though.
 
Well I've managed to get it to work by a convoluted version of 'have you tried switching it off and on again'...

  • set the template mod to enabled (1) by fiddling in the production db
  • uploaded a slightly modified template mod that had been set to disabled on the dev server
  • then uploaded another slightly modified template that had been set to enabled on the dev server

I'm not sure how it got the disabled/enabled flag out of sync on the production server but this seems to have kicked it back into sync.

(I'm still sure there would have been a simpler method to do this!)
 
Back
Top Bottom