PHP Fatal error: Call to a member function get_page_permastruct()
-
I’m having some trouble using the wp_insert_post function. Everything was working fine, then for some reason when I post something new, I get a HTTP 500 error in IE (no error in Firefox, the page just doesn’t load). I don’t remember triggering anything to have made this stop working. I even reverted back to an older version I know was working and get the same error.
I took a look at my apache logs and here seems to be the culprit.
[error] [client 127.0.0.1] PHP Fatal error: Call to a member function get_page_permastruct() on a non-object in C:\\Apache\\htdocs\\wp-tb\\wp-includes\\link-template.php on line 139, referer: https://tb.dev/?page_id=3
The curious part is that it posts the info to the database, but gives the page error in IE after that. If I comment out the line: wp_insert_post($tb_form_post);
Everything seems to work fine – except that it isn’t posting to the database.I was thinking redirect, or link issue? Any ideas?
Thanks.
- The topic ‘PHP Fatal error: Call to a member function get_page_permastruct()’ is closed to new replies.