XF 2.0 Internal server error in "Manually featuring (or unfeaturing) threads" step in the tutorial

Komposten

Member
I've been following the official XenForo 2.0 development tutorial to get the basics of how to make add-ons. However, I've run into a very unexpected problem on the "Manually featuring (or unfeaturing) threads" step: I can't test or save the new template modification.

I've copied everything from the tutorial into the appropriate fields (template, key, find and replace). But when I press "save" or "test" I get a dialogue that says "internal server error".
After playing around a bit I found that I can save/test the template mod if I either:
  • change isUpdate from the if clause in the replace text to pretty much anything else. E.g. isUpdat is enough to get the template mod test to work, but it obviously introduces an error if the code is run later.
  • or remove the <xf:hiddenval name="_xfSet[featured]" value="1" /> line from the replacement text.
Why would an issue like this occur? I assumed that "test" wouldn't do anything more than applying the search&replace on the template, in which case it wouldn't make sense that something like this can happen. Same goes for "save".

I checked the browser's console as the error message suggested and all I see is POST https://[address].com/dev/admin.php?template-modifications/2/save 500 (Internal Server Error) preceded by the usual "Contact the administrator" message. Neither XenForo's nor CPanel's error logs hold any messages. I don't currently have access to the raw error log files on the server as I'm not the owner of the server, but hopefully the owner will be able to send me the logs soon enough so I can check them for potential messages that are not caught by XF or CPanel if needed.
 
Top Bottom