Title: MPD not working properly/error
Last modified: September 1, 2016

---

# MPD not working properly/error

 *  Resolved [Walter Kamer](https://wordpress.org/support/users/broadloommedia/)
 * (@broadloommedia)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/)
 * What I have:
 * – WP 4.5.3
    – MPD 0.9.1 – Logged in with Super Admin – MPD is network activated–
   On primary site (eg. example.com) MPD restriction is set to master site ‘Templates’(
   templates.example.com)
 * Situation ‘Error’:
 * – When opening a page on my existing site templates.example.com MPD is active/
   visible, this is OK because it’s the master
    – Adding a new site ‘Site 2’ (site2.
   example.com) – When opening a page on the new site2.example.com MPD is still 
   active/visible, but also gives an error at all the sites displayed:
 * Site(s) you want duplicate to:
 * Warning: in_array() expects parameter 2 to be array, null given in /home2/wkamer/
   public_html/*****.com/wp-content/plugins/multisite-post-duplicator/inc/postform_ui.
   php on line 99
    *****.com
 * Warning: in_array() expects parameter 2 to be array, null given in /home2/wkamer/
   public_html/*****.com/wp-content/plugins/multisite-post-duplicator/inc/postform_ui.
   php on line 99
    Templates
 * Warning: in_array() expects parameter 2 to be array, null given in /home2/wkamer/
   public_html/*****.com/wp-content/plugins/multisite-post-duplicator/inc/postform_ui.
   php on line 99
    Site1
 * Warning: in_array() expects parameter 2 to be array, null given in /home2/wkamer/
   public_html/*****.com/wp-content/plugins/multisite-post-duplicator/inc/postform_ui.
   php on line 99
    Site2 (Current Site)
 * – When opening a page on existing ‘Site 1’ site1.example.com, the restrictions
   are still OK. So no MDP active/visible
    – After ‘Network deactivate’ and activate
   again, the error disappears – When opening a page again the MDP is still active/
   visible
 * After a while testing I found this to resolve the problem:
 * (Deactivating/activating the MDP plugins can first solve the error issue, but
   the following two steps solves the problem directly)
    – On the primary site I
   set the MPD restriction to ‘No Restriction’ and saved it – On the primary site
   I set the MPD restriction back to ‘Templates’ and saved it – Every thing look
   fine again
 * Hope this info is helpful to solve the issue.
 * Regards,
 * Walter Kamer
 * [https://wordpress.org/plugins/multisite-post-duplicator/](https://wordpress.org/plugins/multisite-post-duplicator/)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535589)
 * Thank you very much for the info Walter. These are actually only Warning messages
   because you have ‘debug mode’ on. MDP should still function as expected. I will
   add a fix to ensure the warning messages don’t appear in debug mode in a future
   release!
 * Thanks again!
 *  Thread Starter [Walter Kamer](https://wordpress.org/support/users/broadloommedia/)
 * (@broadloommedia)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535602)
 * I’m not aware of having ‘debug mode’ on. This is really an error, because the
   MPD will be visible on new sites added (with this warning/error message), while
   this should not because I selected only one master. And while the MPD is visible
   on the new sites you can copy pages to other sites!
    So really this is not only
   a warning message.
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535608)
 * Hi Walter. Thanks for the follow up. Can you turn off debug mode and and report
   back if there are still problems?
 * Go into your wp-config.php file on your site root directory and change line:
 * `define( 'WP_DEBUG', true );`
 * to
 * `define( 'WP_DEBUG', false );`
 * [https://codex.wordpress.org/Editing_wp-config.php#Debug](https://codex.wordpress.org/Editing_wp-config.php#Debug)
 *  Thread Starter [Walter Kamer](https://wordpress.org/support/users/broadloommedia/)
 * (@broadloommedia)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535610)
 * Hey MagicStick,
 * define(‘WP_DEBUG’, false); is already in de wp-config.php
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535612)
 * Thanks walter. I’m looking into this right now and can’t replicate for the life
   of me. Gimme a few hours and I’ll see whats up.
 *  Thread Starter [Walter Kamer](https://wordpress.org/support/users/broadloommedia/)
 * (@broadloommedia)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535618)
 * If you want to set up a Skype session, I can show you?
 *  Thread Starter [Walter Kamer](https://wordpress.org/support/users/broadloommedia/)
 * (@broadloommedia)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535843)
 * Hello,
 * My post is marked as resolved, but I don’t see an update on the plugin. Did you
   fixed it? If so, when will there come a new release?
 *  [seedpxwee5](https://wordpress.org/support/users/seedpxwee5/)
 * (@seedpxwee5)
 * [9 years, 11 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535885)
 * You may have the following code in your functions.php or somewhere.
 *     ```
       error_reporting(E_ALL);
       ini_set('display_errors', 1);
       ```
   
 * If you use sublime you can use Ctrl Shift F to look for the text
 *  [Tarei King](https://wordpress.org/support/users/tareiking/)
 * (@tareiking)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-7535905)
 * [@magicstick](https://wordpress.org/support/users/magicstick/) [https://github.com/magicstickuk/multisite-post-duplicator/blob/v0.9.1/addons/restrictSites-mpd-addon.php#L65](https://github.com/magicstickuk/multisite-post-duplicator/blob/v0.9.1/addons/restrictSites-mpd-addon.php#L65)
   is returning `false` when [https://github.com/magicstickuk/multisite-post-duplicator/blob/v0.9.1/inc/postform_ui.php#L99](https://github.com/magicstickuk/multisite-post-duplicator/blob/v0.9.1/inc/postform_ui.php#L99)
   expects an array.
 * I’d rather not suppress warnings, but kinda have no choice in this instance. 
   Hope that helps you fixin’ this.
 *  Plugin Author [MagicStick](https://wordpress.org/support/users/magicstick/)
 * (@magicstick)
 * [9 years, 8 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-8203904)
 * can someone confirm to me if these PHP warnings disappeared for you in v0.9.2?
   Thanks!

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘MPD not working properly/error’ is closed to new replies.

 * ![](https://ps.w.org/multisite-post-duplicator/assets/icon-128x128.png?rev=1562920)
 * [Multisite Post Duplicator](https://wordpress.org/plugins/multisite-post-duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/multisite-post-duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/multisite-post-duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/multisite-post-duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/multisite-post-duplicator/reviews/)

 * 10 replies
 * 4 participants
 * Last reply from: [MagicStick](https://wordpress.org/support/users/magicstick/)
 * Last activity: [9 years, 8 months ago](https://wordpress.org/support/topic/mpd-not-working-properlyerror/#post-8203904)
 * Status: resolved