Quantcast
Channel: 500 – WordPress.org Forums
Viewing all articles
Browse latest Browse all 2443

OsakaWebbie on "Error 500 trying to add new anything"

$
0
0

Thanks for the reply. I had already tried disabling the plugins, and I knew that .htaccess hadn't been changed since I originally built the site over a year ago, but I did everything as you suggested, and it turns out that the offender is my child theme! Since the problem happens on the admin panel, not the site itself, I wasn't thinking of themes.

Indeed there is plenty of code in my child theme, most having to do with a custom post type and/or language issues (areas where even WPML fell short of how I wanted it to behave). I laboriously commented and uncommented parts of my functions.php until I honed in on a single line of code that I could comment out and see "Posts -> Add New" run without errors - it relates to WPML, so I'll have to ask them why it's no longer compatible.

But the general WordPress concept that baffles me is that apparently save_post() is run even when initially displaying the form for adding a post. The offending code was in a function that I am hooking like this: add_action('save_post', 'duplicate_or_translate_new_entry'); Why does that run when I merely click "Posts -> Add New" (not when I save, but just trying to see the new post form)?


Viewing all articles
Browse latest Browse all 2443

Trending Articles