Title: Eric Liddon's Replies | WordPress.org

---

# Eric Liddon

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

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

 Search replies:

## Forum Replies Created

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

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Safari Push] No popup](https://wordpress.org/support/topic/no-popup-2/)
 *  Thread Starter [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/no-popup-2/#post-5796530)
 * So I found my issue. It wasn’t with this plugin but my server side config. My
   WEBSITE_NAME did not match what I had configured the name for Push ID I created
   on the apple developer portal.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [TinyMCE editor inserting links not working](https://wordpress.org/support/topic/tinymce-editor-inserting-links-not-working/)
 *  [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/tinymce-editor-inserting-links-not-working/#post-4056450)
 * I had the same issue when using the tinymce editor on the front end. The latest
   version of WordPress is using an updated Jquery and Jquery-ui.
 * I was loading a later version of jquery & jquery-ui since I required it for some
   plugins. In doing so I was deregistering “jquery-ui-core” on the front end, and
   registering my own version so I could use some other stuff. This didn’t have 
   an issue, but it appears tinymce would try to load its js plugins with a dependency
   on the existing jquery-ui-core (or others that depended on it).
 * Check your theme to see if it has used wp_deregister_script() anywhere, and check
   if it is deregistering any of the jquery-ui js libraries.
 * I’d also check to make sure jquery or jquery-ui is not being loaded twice as 
   that may also cause some issues similar to this.
 * If you check out your code markup on your page, check to see what scripts wp-
   load-scripts.php is loading if you are missing any of the following I would assume
   your issue is either a conflict with versions or dependency not loading.
 * editor
    jquery-ui-core jquery-ui-widget jquery-ui-resizable jquery-ui-draggable
   jquery-ui-button jquery-ui-position jquery-ui-dialog wpdialogs wplink wpdialogs-
   popup
 * It most likely is loading more, but I would start with those to see if they are
   there.
 * You could try using wp_enqueue_script() to register them as well if they aren’t
   there. If you are in the Admin panel though this should be loaded automatically
   if you are in an edit or create post/page. Even on the front end most of the 
   stuff loads automatically when you load a tinymce from wp_editor()
 * Hope this helps you fix your issue.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] Fatal error: Cannot use string offset as an array](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/)
 *  [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/page/2/#post-3552196)
 * I was able to, although when I reverted back to 4.2.8 I tried to reset the Analytics
   Profile using the automatic method (in which it failed – not sure what the error
   message was), so I entered my UA code in manually then did the upgrade and I 
   didn’t have an issue after that…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] Fatal error: Cannot use string offset as an array](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/)
 *  [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/page/2/#post-3552166)
 * Not sure if this will resolve anyone’s issue, but I upgraded from 4.2.8 to 4.3.2,
   had the issue, then uploaded 4.2.8 back over top and then re-did the upgrade 
   and the error went away…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] Fatal error: Cannot use string offset as an array](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/)
 *  [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/#post-3552127)
 * So figured my issue, In my filter:
 * add_filter(‘yoast-ga-custom-vars’,’add_ga_custom_vars’,10,2);
 * I had the following for my function declaration:
    function add_ga_custom_vars(
   $push, &$customvarslot) {
 * Passing by reference was depreciated in php 5.3 and removed in 5.4 (see [Here](http://php.net/manual/en/language.references.pass.php)
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] Fatal error: Cannot use string offset as an array](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/)
 *  [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [13 years, 5 months ago](https://wordpress.org/support/topic/fatal-error-cannot-use-string-offset-as-an-array-2/#post-3552126)
 * So I had a similar issue. Everything worked fine on 4.2.8 Then I upgraded PHP
   to 5.3 (from 5.2.17) and I recieved this error:
 * Warning: Parameter 2 to add_ga_custom_vars() expected to be a reference, value
   given in …/wp-includes/plugin.php on line 173
 * So I tried upgrading to 4.3.2 of the plugin and I received the error:
    Fatal 
   error: Cannot use string offset as an array in …/wp-content/plugins/google-analytics-
   for-wordpress/admin/class-admin.php on line 344
 * I had a custom filter to add custom vars using the following in my functions.
   php in my theme folder:
    add_filter(‘yoast-ga-custom-vars’,’add_ga_custom_vars’,
   10,2);
 * (I didn’t include function yet).
 * Once I disabled this filter I had neither error mentioned above…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] [Plugin: Google Analytics for WordPress] How can I add my own custom variable](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-how-can-i-add-my-own-custom-variable/)
 *  [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-how-can-i-add-my-own-custom-variable/#post-2922891)
 * I figured it out… You can use something like the code below:
 *     ```
       add_filter('yoast-ga-custom-vars','add_ga_custom_vars',10,2);
   
       function add_ga_custom_vars($push, &$customvarslot) {
          $my_custom_val = "whaterver";
       $push[] = "'_setCustomVar',".$customvarslot.",'My_Custom_Variable','".$my_custom_val."',3";
          $customvarslot++;
          return $push;
       }
       ```
   
 * This worked for me. Hope it helps someone else.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] [Plugin: Google Analytics for WordPress] How can I add my own custom variable](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-how-can-i-add-my-own-custom-variable/)
 *  [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-google-analytics-for-wordpress-how-can-i-add-my-own-custom-variable/#post-2922890)
 * Did you ever find a solution for this? I want to do the same thing…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Featured Image (Auto Post Thumbnail)] [Plugin: Auto Post Thumbnail] FIX: (if you've deleted thumbnails in past)](https://wordpress.org/support/topic/plugin-auto-post-thumbnail-fix-if-youve-deleted-thumbnails-in-past/)
 *  Thread Starter [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [14 years ago](https://wordpress.org/support/topic/plugin-auto-post-thumbnail-fix-if-youve-deleted-thumbnails-in-past/#post-2908706)
 * It is not letting me edit my earlier post, but just wanted to forewarn people
   Do not run that code to Delete the featured image. Using the wp_delete_attachment
   will also cause it to delete the First Image of every post. If a moderator sees
   this maybe they can remove that part from above.
 * I didn’t notice the issue because when I re-ran Auto Post Thumbnail from my dev
   site it was using my production site to grab the Thumbnails and would recreate
   all the images properly. When I ran it on production… not so lucky 🙂
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Auto Featured Image (Auto Post Thumbnail)] [Plugin: Auto Post Thumbnail] FIX: (if you've deleted thumbnails in past)](https://wordpress.org/support/topic/plugin-auto-post-thumbnail-fix-if-youve-deleted-thumbnails-in-past/)
 *  Thread Starter [Eric Liddon](https://wordpress.org/support/users/eliddon/)
 * (@eliddon)
 * [14 years ago](https://wordpress.org/support/topic/plugin-auto-post-thumbnail-fix-if-youve-deleted-thumbnails-in-past/#post-2908496)
 * To fix the wp-image tags we can do the following (Note, this will only fix the
   ones for the image that Auto Post Thumbnail creates) Also this includes the fix
   above.
 * After (around line 263)
 *     ```
       preg_match('/wp-image-([\d]*)/i', $image, $thumb_id);
       $thumb_id = $thumb_id[1];
       ```
   
 * Add:
 *     ```
       $old_thumb_id = $thumb_id;
   
       * Check if $thumb_id actually exists in DB */
       if ($thumb_id) {
         $result = $wpdb->get_results("Select ID FROM {$wpdb->posts} WHERE ID = '".$thumb_id."'");
         if (!$result)
           unset($thumb_id);
       }
       ```
   
 * Then After (around line 287)
 *     ```
       if ($thumb_id) {
         update_post_meta( $post_id, '_thumbnail_id', $thumb_id );
       ```
   
 * Add:
 *     ```
       /* Fix Image class tag in Post wp-image-#### */
       if ($old_thumb_id) {
         $updated_post = array();
         $updated_post['ID'] = $post_id;
         $updated_post['post_content'] = preg_replace('/wp-image-'.$old_thumb_id.'/i','wp-image-'.$thumb_id,$post[0]->post_content);
         wp_update_post( $updated_post );
       }
       ```
   
 * Just to sum up, I ran into this problem because I wanted to resize all my thumbnails
   larger (and the regenerate thumbnails plugin didn’t reset the featured image).
 * So I ran the followign code (from a .php file in the root)
 *     ```
       require_once("wp-load.php");
       echo 'Working... '; ob_flush();
       global $wpdb;
       $attachments = $wpdb->get_results("SELECT * FROM $wpdb->postmeta WHERE meta_key = '_thumbnail_id'");
       foreach($attachments as $attachment){
            $wpdb->query("DELETE FROM $wpdb->postmeta WHERE meta_id = '$attachment->meta_id' LIMIT 1");
            wp_delete_attachment($attachment->meta_value, true);
       }
       echo 'done!';
       ```
   
 * Code was found from [Here](http://wordpress.stackexchange.com/questions/43320/query-to-delete-all-featured-images-and-remove-post-meta)
 * Note, I don’t recommend deleting your previous thumbnails as it will effect your
   SEO on your images since essentially they are new images. Although I’m not entirely
   sure how you would increase your thumbnail size without impacting your SEO on
   the images.
 * Hopefully this helps someone!

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