Home Forums ACF PRO Can't Save Post if I Add a URL to a Text/URL Field??? Reply To: Can't Save Post if I Add a URL to a Text/URL Field???

  • Hmm… I enabled WP debug and I saw this appear repeatedly throughout the site:

    Notice: is_main_query was called incorrectly. In pre_get_posts, use the WP_Query::is_main_query() method, not the is_main_query() function. See Please see Debugging in WordPress for more information. (This message was added in version 3.7.) in /home/onestopmods/public_html/wp-includes/functions.php on line 3245

    I deactivated the plugin, but I couldn’t access the site after that because of a get_field error (I assume this is normal if the plugin is deactivated) so I can’t really say if the plugin is the one causing this.

    Also, if debug mode is on and if the plugin is enabled, I’m unable to even click “submit”.

    Here’s the code for my “Add Post” page:

    Template Name: Add Post
    $specat = $_GET['cat'];
    	if($specat == 2){$namecat = Minecraft;}
    <div id="main" class="full-width"><div class="wrap cf">
    	<div id="content" role="main">
    		<?php while (have_posts()) : the_post(); ?>
    		<div <?php post_class() ?> id="post-<?php the_ID(); ?>">
    			<h1 class="page-title">Submitting a Mod for: <?php echo $namecat; ?></h1>
    			<div class="page-content rich-content">
    			if($specat == 2){$specicat = 1193;}
    					'post_title' => true,
    					'post_content' => true,
    					'post_id'		=> 'new_post',
    					'new_post'		=> array(
    						'post_title'  => 'New Post',
    						'post_type'		=> 'post',
    						'post_status'		=> 'pending',
    						'post_category'  => array("$specat") ,
    					'field_groups' => array( 1185, 1191, $specicat, 1197, 1200),
    					'submit_value'	=> 'Submit Your Mod',
    					'return' => '',
    				)); ?>
    		</div><!--end .hentry-->
    		<?php endwhile; ?>
    	</div><!--end #content-->
    </div></div><!-- end #main -->
    <?php get_footer(); ?>