I’m trying to update a template with PHP code and when I hit Update or Update and Finished I am presented with the site’s home page (as opposed to anything within the CP).
I did some searching in this forum and found some people experienced similar issues due to a mod_security problem. I excitedly pasted the proper code in my .htaccess file but was met with 500 errors. I then looked in my server logs and found no errors related to my attempts to update the template. Between the 500 errors and lack of mod_security errors, I figured maybe that wasn’t my problem.
I started updating the template in question with chunks of the PHP code. Once I found a chunk that caused the problem, I then started paring it down line by line until I didn’t get the problem any more. I then tried to submit it with just the offending line and it didn’t cause the problem. The problem reliably appears when all of the code is submitted and when certain chunks are submitted, but not when the apparently offending lines are submitted by themselves. I’m at a loss.
One other note: this same code was submitted to a template on this site when I was running EE 1.x on this same server (although the submission took place a few years ago).
Any ideas?