Jetpack by WordPress.com
[resolved] Jetpack Invalid Argument Supplied for foreach() (2 posts)

  1. craftcore
    Posted 3 years ago #

    Hi! My WordPress site is set up for registered users. Contributors can submit posts, but when they submit their post, they are met with the following error referencing the Jetpack plugin:

    Warning: Invalid argument supplied for foreach() in /home/craftcore/craftcore.ca/wp-content/plugins/jetpack/jetpack.php on line 1243

    The code around that line is:

    function admin_menu_order() {
    	return true;
    	function jetpack_menu_order( $menu_order ) {
    		$jp_menu_order = array();
    		foreach ( $menu_order as $index => $item ) {
    			if ( $item != 'jetpack' )
    				$jp_menu_order[] = $item;
    			if ( $index == 0 )
    				$jp_menu_order[] = 'jetpack';
    		return $jp_menu_order;

    Although the error comes up when contributors post a new blog, the post does submit properly.

    Does anyone hae any advice?


  2. craftcore
    Posted 3 years ago #

    I discovered the problem by disabling a plugin one at a time and submitting new posts until the error disappeared.

    The conflicting plugin was Role Scoper.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Jetpack by WordPress.com
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic