CATS JobSite
Created thousands of pages! (2 posts)

  1. aapc
    Posted 3 years ago #

    After installing and activating this plugin, I could not access my site. I had to restart MySQL as it seems the plugin was stuck in a loop creating pages. By the time I stopped the process, it created over 3,000 "jobs" pages. Thinking I might get a different result, I cleaned up the mess and tried again. Same thing.

    We have this plugin running on an older WP 3.0.4 site and it seems to work fine. Anybody else having trouble with this plugin and 3.5.x?


  2. aapc
    Posted 3 years ago #

    Updated the following function in cats_cms.php and it seems to be working. Time for an update CATS?

    function cats_cms_page() {
    	global $catsPageID, $user_ID;
    	$option = 'cats_cms_postid';
    	/* We save the page as an option to prevent a bigger query each page load */
    	$postID = get_option($option, false);
    	/* Option exists, but does the page exist? */
    	if ($postID) {
    		$post = get_page($postID);
    		if (!$post->ID) {
    			$postID = false;
    	/* If no page exists, we need to add it */
    	if (!$postID) {
    		$postID = wp_insert_post(array(
    				'post_title' => 'Jobs',
    				'post_content' => ' ',
    				'post_status' => 'publish',
    				'post_author' => $user_ID,
    				'post_type' => 'page',
    				'post_parent' => 0,
    				'guid' => 'cats_cms',
    				'comment_status' => 'closed',
    				'ping_status' => 'closed'
    		), false);
    		if (!$postID) {
    				printf('<h3>CATS CMS Plugin Error</h3><p>Failed to create jobs page.');
    		} else {
    				update_option($option, $postID);
    	$catsPageID = $postID;

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic