Title: johnrom's Replies | WordPress.org

---

# johnrom

  [  ](https://wordpress.org/support/users/johnrom/)

 *   [Profile](https://wordpress.org/support/users/johnrom/)
 *   [Topics Started](https://wordpress.org/support/users/johnrom/topics/)
 *   [Replies Created](https://wordpress.org/support/users/johnrom/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/johnrom/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/johnrom/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/johnrom/engagements/)
 *   [Favorites](https://wordpress.org/support/users/johnrom/favorites/)

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[WooCommerce] Can’t install on local wamp site says Trojan:Win32/Emali.A!cl](https://wordpress.org/support/topic/cant-install-on-local-wamp-site-says-trojanwin32-emali-acl/)
 *  [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/cant-install-on-local-wamp-site-says-trojanwin32-emali-acl/#post-16673023)
 * I’m also experiencing this with `7.6.0`.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Order Export For WooCommerce] Settings are not saved](https://wordpress.org/support/topic/settings-are-not-saved-6/)
 *  [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/settings-are-not-saved-6/#post-10054834)
 * Hi Alex,
 * It was not a public plugin. I don’t think plugins should be switching out custom
   versions of WordPress-provided jQuery plugins, so I personally wouldn’t worry
   about this issue.
 * If you really think it is necessary to fix, you can test the functionality by
   adding an action to `wp_enqueue_scripts` where you enqueue a custom version of`
   jquery-serialize-object`. Something like this should work:
 *     ```
       function algol_custom_assets() {
   
           wp_enqueue_script( 
               'custom-serialize-object', 
               'https://cdnjs.cloudflare.com/ajax/libs/jquery-serialize-object/2.4.5/jquery.serialize-object.min.js', 
               array('jquery'), 
               '2.4.5', 
               true 
           );
       }
       add_action('wp_enqueue_scripts', 'algol_custom_assets') );
       ```
   
 * Then you should test if `$_POST['json']` starts with `"`, and if so, run the 
   commands I wrote in my previous comment.
 *     ```
       $json_string = trim( $_POST['json'], '"');
       $json_string = wp_unslash( $json_string );
   
       $json = json_decode( $json_string, true );
       ```
   
 * John
 * P.S., if they override `jquery-serialize-object`, Woo product variations no longer
   work either so exporting could be the least of the user’s problems.
    -  This reply was modified 8 years, 4 months ago by [johnrom](https://wordpress.org/support/users/johnrom/).
    -  This reply was modified 8 years, 4 months ago by [johnrom](https://wordpress.org/support/users/johnrom/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Order Export For WooCommerce] Settings are not saved](https://wordpress.org/support/topic/settings-are-not-saved-6/)
 *  [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/settings-are-not-saved-6/#post-10049377)
 * Hi Alex,
 * It looks like another plugin was changing the version of `jquery-serialize-object`,
   and removing that plugin fixed things. Thanks for your help!
 * John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Advanced Order Export For WooCommerce] Settings are not saved](https://wordpress.org/support/topic/settings-are-not-saved-6/)
 *  [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/settings-are-not-saved-6/#post-10041156)
 * Hi Alex,
 * In my opinion, having the $_POST overridden in the first place is making the 
   debug process a headache (how were we ever to know $_POST should have been overridden
   without reading the entire plugin?). However, the issue here appears to be that
   the JSON is wrapped in an extra set of quotes.
 * The form data being sent by JavaScript looks like this:
 * `json="{"settings":""}"` which results in `json_decode()` returning a _string_
   that looks like `{"settings":""}`
 * Additionally, `stripslashes_deep` doesn’t do exactly what is needed to parse 
   this string, as there is an issue parsing `"\""` from the slashes. It should 
   use `wp_unslash` instead.
 * The following is the code that allows me to properly save settings — though I
   still recommend not overriding `$_POST`!
 *     ```
       $_POST = array_map('stripslashes_deep', $_POST);
   
       // parse json to arrays?
       if ( ! empty( $_POST['json'] ) ) {
       	$json_string = trim( $_POST['json'], '"');
       	$json_string = wp_unslash( $json_string );
   
       	$json = json_decode( $json_string, true );
   
       	if(is_array($json)) {
       		$_POST = $_POST + $json;
       		unset( $_POST['json'] );
       	}
       }
       ```
   
    -  This reply was modified 8 years, 4 months ago by [johnrom](https://wordpress.org/support/users/johnrom/).
    -  This reply was modified 8 years, 4 months ago by [johnrom](https://wordpress.org/support/users/johnrom/).
    -  This reply was modified 8 years, 4 months ago by [johnrom](https://wordpress.org/support/users/johnrom/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Ecwid by Lightspeed Ecommerce Shopping Cart] 5.0.6 Constant misspelled](https://wordpress.org/support/topic/5-0-6-constant-misspelled/)
 *  Thread Starter [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/5-0-6-constant-misspelled/#post-9023456)
 * No problem!
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] Many Widgets breaks Widget page](https://wordpress.org/support/topic/many-widgets-breaks-widget-page/)
 *  Thread Starter [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/many-widgets-breaks-widget-page/#post-8186525)
 * Hi Predrag,
 * The problem is not that you cannot edit or scroll. The issue is that you cannot
   click within the box highlighted in my screenshot, specifically within the bounding
   box of wp-footer. If, as happened to me, the “save” button or any other UI item
   of a widget happens to fall within this box, you will not be able to click it.
   For a client, this could be very confusing since it is an invisible element.
 * Also, I’m using Chrome Stable 53.0.2785.113 m x64 on Windows 10 x64 build 10586
 * John
    -  This reply was modified 9 years, 9 months ago by [johnrom](https://wordpress.org/support/users/johnrom/).
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] Many Widgets breaks Widget page](https://wordpress.org/support/topic/many-widgets-breaks-widget-page/)
 *  Thread Starter [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/many-widgets-breaks-widget-page/#post-8182400)
 * To clarify, I’m referring to any time the custom or core sidebars on the right
   are longer than the available widgets on the left. You can tell this is happening
   because the darker gray background on the right cuts off, and WP Footer “Thank
   you for Creating with WordPress” shows up before the end of the page. This footer
   is z-indexed higher than the sidebars themselves, so you’ll find that you are
   unable to click within the space that the footer takes up.
 * I’m not sure how to upload an image for use on this forum, so I have chosen a
   random image upload website. Apologize in advance if this is not the recommended
   approach. The image below is taken from a fresh install of WordPress 4.6.1 with
   only Custom Sidebars 2.1.1.0 installed using Twenty Sixteen 1.1
 * ![Brand New Widgets Page](https://postimg.org/image/e6ettaigz/)
 * [https://postimg.org/image/e6ettaigz/](https://postimg.org/image/e6ettaigz/)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] Many Widgets breaks Widget page](https://wordpress.org/support/topic/many-widgets-breaks-widget-page/)
 *  Thread Starter [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/many-widgets-breaks-widget-page/#post-8174976)
 * I forgot to mention, this is importer because `wp-footer` will actually stop 
   being pushed down, and is z-indexed higher than the widgets themselves, meaning
   in certain circumstances it can completely block a user from clicking the ‘save’
   button or taking other actions on a widget.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Custom Sidebars - Dynamic Sidebar Classic Widget Area Manager] Undefined Index: Action on New Post (quick fix)](https://wordpress.org/support/topic/undefined-index-action-on-new-post-quick-fix/)
 *  Thread Starter [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/undefined-index-action-on-new-post-quick-fix/#post-8173477)
 * Thanks Marcin, that did the trick.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Woocommerce CSV importer] Debug Issue: non-static method should not be called statically](https://wordpress.org/support/topic/debug-issue-non-static-method-should-not-be-called-statically/)
 *  [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/debug-issue-non-static-method-should-not-be-called-statically/#post-4242661)
 * Hi Bozz,
 * All instances of ‘WebPres_Woo_Product_Importer’ passed to call_user_func_array
   have to be replaced by an instantiated object. In this case, it would be `&$this`
   since it is within a class constructor.
 * If you run a find/replace of ‘WebPres_Woo_Product_Importer’ with `&$this`, the
   error will go away and everything should go back to normal.
 * [Here is my version of woo_product_importer.php](http://pastebin.com/9QJVwUk2)
 * John
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Constant Contact for WordPress] Signing up for one list results in removal from all others](https://wordpress.org/support/topic/signing-up-for-one-list-results-in-removal-from-all-others/)
 *  [johnrom](https://wordpress.org/support/users/johnrom/)
 * (@johnrom)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/signing-up-for-one-list-results-in-removal-from-all-others/#post-3664527)
 * I had this issue today when dealing with a client’s website. I created a temporary
   workaround for this, if you replace the class.cc.php file with this one, it should
   work:
    [class.cc.php on pastebin](http://pastebin.com/ZWQTXepr)
 * More specifically, the get_contact function needs a third variable in order to
   override the transients and make sure we have the real contact in constantcontact.
   com.
 * line 921 should be:
 *     ```
       function get_contact($id = null, $timeout = 3600, $refresh = false)
       ```
   
 * line 925 should be adapted to use the third variable
 *     ```
       if( !empty($timeout) && !$refresh && $contact && (!isset($_GET['refresh']) || $_GET['refresh'] !== 'contact')) { return maybe_unserialize($contact); }
       ```
   
 * Line 768, need to load the contact’s current lists and merge them.
 *     ```
       $contact = $this->get_contact($id, 3600, true);
       $current_lists = $contact['lists'];
       // email address is already listed in $email
       unset($additional_fields['EmailAddress']);
       if ( empty($additional_fields) && count(array_intersect($lists, $current_lists)) == count($lists) )
            return true; // already registered for all lists, nothing else to do, let's not send another request
       $lists = array_unique( array_merge($current_lists, $lists) );
       ```
   

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