“Apache HTTP Service has stopped working” with WP Query in WordPress 2.9.2
When my script runs the 4th line below in WP 2.9.2, its causing my web app to throw an “Apache HTTP Service has stopped working” error
When my script runs the 4th line below in WP 2.9.2, its causing my web app to throw an “Apache HTTP Service has stopped working” error
I am running some of the WP functions directly inside a plugin, including wp_insert_post(), if something goes wrong, this returns a WP Error object, what is the correct method to catch this error? Either using built in WP functions or PHP exceptions or whatnot..
How do I detect errors when using $wpdb->get_results()?
In order of figuring out the following issue, see https://wordpress.stackexchange.com/questions/178995/sanitize-a-working-query-string-by-using-wpdb-prepare-fails-with-mysql-db-er i ran into an rather odd behaviour. Even that my used query was correct and showing the right output.
I’ve got a custom post type with a standard tag taxonomy added to it like so: 'taxonomies' => array('post_tag'). I’ve added some tags to some posts of this CPT which are display on the front-end with the template tag the_tags() and the links it generates have this format http://local.mysite.dev/tag/tag1/. When I click such a link a page without any posts is generated using the tag.php template, but if I add ?post_type=seron_mycpt to the end of the URL like so http://local.mysite.dev/tag/tag1/?post_type=seron_mycpt a page with the relevant posts is generated using the same template but this time I also get these lines added to debug.log:
My error when writing a plugin for uploads