Title: dancriel's Replies | WordPress.org

---

# dancriel

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

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

 Search replies:

## Forum Replies Created

Viewing 15 replies - 1 through 15 (of 57 total)

1 [2](https://wordpress.org/support/users/dancriel/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/dancriel/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/dancriel/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/dancriel/replies/page/2/?output_format=md)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Pixabay Images] Error: File attachment metadata error](https://wordpress.org/support/topic/error-file-attachment-metadata-error-3/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/error-file-attachment-metadata-error-3/#post-9707087)
 * I was having this issue as well. The plugin is intentionally avoiding HTTPS for
   some reason, and the Pixabay server seems to be intermittently throwing Bad Request(
   HTTP 400) errors on the non-secure http:// URLs.
 * The following change should stop the Pixabay plugin from forcing non-secure image
   download URLs.
 * In `pixabay-images.php`, replace line **190**:
 * `$url = str_replace('https:', 'http:', $_POST['image_url']);`
 * with:
 * `$url = $_POST['image_url'];`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Analyticator] Major Conflict With WPSEO 3.6 – Wipes Out Google Analyticator Options Page](https://wordpress.org/support/topic/major-conflict-with-wpseo-3-6-wipes-out-google-analyticator-options-page/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/major-conflict-with-wpseo-3-6-wipes-out-google-analyticator-options-page/#post-8239206)
 * I think this is a 2 year old bug that was never fixed. The solution offered in
   [this support thread](https://wordpress.org/support/topic/recent-update-throws-error-in-settings-page/)
   worked for me and restored the Analyticator options page as well as the dashboard
   widget provided by this plugin, which was also broken.
 * Summary:
    1. Edit google-analyticator/google-api-php-client/src/Google_Client.php
    2. Change line 35 from: `require_once "config.php";` to `require_once (dirname(
       __FILE__) . "/config.php");`
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BruteProtect] Fairly serious performance issue – auto-loaded options](https://wordpress.org/support/topic/fairly-serious-performance-issue-auto-loaded-options/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/fairly-serious-performance-issue-auto-loaded-options/#post-5137229)
 * I never got my original approach to work because it looks like using the set_site_transient()
   function prevents these action hooks from being called, so there is no opportunity
   to fix the transient right after it’s inserted. So instead I decided to schedule
   a custom cleanup function every 15 minutes. I had to define a custom cron schedule
   option in order to do this. Code below:
 *     ```
       // define a custom shorter cron interval
       function dc_customize_cron_schedules( $schedules ) {
       	$schedules['every15'] = array(
       		'interval' => 60 * 15,
       		'display' => __( 'Every 15 Minutes' )
       	);
       	return $schedules;
       }
       add_filter( 'cron_schedules', 'dc_customize_cron_schedules' );
   
       // make sure cron job is set
       function dc_setup_cron_schedule() {
       	if ( ! wp_next_scheduled( 'dc_cron_every15' ) ) {
       		wp_schedule_event( time(), 'every15', 'dc_cron_every15');
       	}
       }
       add_action( 'wp', 'dc_setup_cron_schedule' );
   
       // fix site transients autoload bug for BruteProtect
       function dc_cron_fix_BP_site_transients() {
       	global $wpdb;
       	$result = $wpdb->query("
       		UPDATE {$wpdb->options}
       		SET autoload = 'no'
       		WHERE option_name LIKE ( '%_brute_loginable_%' )
       	");
       }
       add_action( 'dc_cron_every15', 'dc_cron_fix_BP_site_transients' );
       ```
   
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BruteProtect] Fairly serious performance issue – auto-loaded options](https://wordpress.org/support/topic/fairly-serious-performance-issue-auto-loaded-options/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/fairly-serious-performance-issue-auto-loaded-options/#post-5137228)
 * The code in my last comment is not working consistently, sometimes it fires, 
   other times it does not. Revising it now.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[BruteProtect] Fairly serious performance issue – auto-loaded options](https://wordpress.org/support/topic/fairly-serious-performance-issue-auto-loaded-options/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/fairly-serious-performance-issue-auto-loaded-options/#post-5137227)
 * It looks like this bug still exists. I am running WP 4.0 and the latest version
   of this plugin, and I found that BruteProtect was keeping almost 45,000 rows 
   in my wp_options table with autoload = ‘yes’. I changed them all to ‘no’ and 
   added the following code to my functions.php file to repair future options immediately
   after BruteProtect sets them.
 *     ```
       function dc_fix_BP_site_transients( $option, $value ) {
       	global $wpdb;
       	if ( stristr( $option, "_site_transient_brute_loginable_" ) ) {
       		$transient_fragment = substr( str_replace( "_site_transient_", "", $option ), 0, 40 );
       		$result = $wpdb->query("
       			UPDATE {$wpdb->options}
       			SET autoload = 'no'
       			WHERE option_name LIKE ( '%{$transient_fragment}%' )
       		");
       		if ( FALSE === $result ) {
       			error_log("Error trying to repair site transient {$option}");
       		} else {
       			//error_log("Successfully repaired site transient {$option}");
       		}
       	}
       }
       add_action( 'added_option', 'dc_fix_BP_site_transients', 10, 2 );
       ```
   
 * I hope this helps someone until there is a better workaround built in to the 
   plugin.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] Stats by author](https://wordpress.org/support/topic/stats-by-author/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/stats-by-author/#post-5345900)
 * I should have used **add_filter** instead of **add_action** but functionally 
   it’s the same since add_action is an alias to add_filter anyway…
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[MonsterInsights - Google Analytics Dashboard for WordPress (Website Stats Made Easy)] Stats by author](https://wordpress.org/support/topic/stats-by-author/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/stats-by-author/#post-5345899)
 * This plugin change really burned me… all the custom variable tracking was removed
   in version 5. I was able to re-enable the features that I use however, by adding
   the following code to my functions.php file.
 *     ```
       function yoast_str_clean( $val ) {
       	return remove_accents( str_replace( '---', '-', str_replace( ' ', '-', strtolower( html_entity_decode( $val ) ) ) ) );
       }
       function fix_yoast_GA_JS( $gaq_push ) {
       	global $wp_query, $current_user;
       	// Make sure $current_user is filled
       	get_currentuserinfo();
       	// pop & store the trackPageView action, which will be the last item in the array
       	$gaq_push_tail = array_pop( $gaq_push );
       	// record logged in user info
       	if ( $current_user && $current_user->ID != 0 ) {
       		array_push( $gaq_push, "'_setCustomVar',1,'logged-in','" . $current_user->roles[0] . "',1" );
       	}
       	// record post author name
       	array_push( $gaq_push, "'_setCustomVar',2,'author','" . yoast_str_clean( get_the_author_meta( 'display_name', $wp_query->post->post_author ) ) . "',3" );
       	// record category
       	if ( is_single() ) {
       		$cats = get_the_category();
       		if ( is_array( $cats ) && isset( $cats[0] ) )
       			array_push( $gaq_push, "'_setCustomVar',3,'category','" . $cats[0]->slug . "',3" );
       	}
       	// restore the trackPageView action to the end of the array
       	array_push( $gaq_push, $gaq_push_tail );
       	return $gaq_push;
       }
       add_action('yoast-ga-push-array-ga-js', 'fix_yoast_GA_JS');
       ```
   
 * This code will re-enable logged-in role, post author name, and post category 
   custom variable tracking. Note that **I hard-coded my custom variable slot numbers**
   and it might not match the slot numbers that you were previously using. Log in
   to GA and check out your Custom Variables dashboard to see which slot number 
   you should be using for each of these.
 * If you really need these features and you don’t feel like messing with the code,
   I guess you could always downgrade to v4.3.5.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Yoast SEO - Advanced SEO with real-time guidance and built-in AI] Issues with variable %%name%%](https://wordpress.org/support/topic/issues-with-variable-name/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years ago](https://wordpress.org/support/topic/issues-with-variable-name/#post-4913512)
 * I had the same issue with the %%name%% replacement variable on multiple installs.
   I went to GitHub and grabbed a copy of the latest version of /inc/wpseo-functions.
   php, and overwrote my local copy. Author page titles are now working as expected,
   and the other features of the SEO plugin seem to be working correctly so I believe
   this is a safe fix until a new version is released to the public.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] Why is W3TC trying to purge my entire Varnish cache?](https://wordpress.org/support/topic/why-is-w3tc-trying-to-purge-my-entire-varnish-cache/)
 *  Thread Starter [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years ago](https://wordpress.org/support/topic/why-is-w3tc-trying-to-purge-my-entire-varnish-cache/#post-4871770)
 * I greatly improved my site performance by combining my hack mentioned above (
   commenting out the PHP in W3TC which would dump the entire cache all at once)
   along with modifying, via my theme’s functions.php file, some of the hooks that
   W3TC uses to determine whether to purge an object. Eventually I will block this
   action at the reverse proxy level instead of within the plugin so W3TC becomes
   upgrade safe again.
 * Example: W3TC will purge a post and any other associated objects (archives, feeds,
   etc.) depending on your settings when a comment is submitted but NOT approved
   for that post. So we were receiving Spam comments which were flagged by Akismet
   and dumped into either Spam or Trash, but yet W3TC still saw fit to purge the
   post from the cache immediately instead of waiting for the comment to actually
   be approved.
 * Bottom line: the Varnish purge criteria in W3TC is too aggressive and fails to
   consider the status of comment objects before issuing purge commands each time
   the object is saved in the WordPress DB.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] WordPress database error Illegal mix of collations](https://wordpress.org/support/topic/wordpress-database-error-illegal-mix-of-collations-3/)
 *  Thread Starter [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years ago](https://wordpress.org/support/topic/wordpress-database-error-illegal-mix-of-collations-3/#post-4836838)
 * Resolved by modifying the W3TC CDN plugin, added COLLATE statements to this query
   and now it runs without error even with non-ascii characters in the path.
 *   Forum: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
   
   In reply to: [Twitter oembed not working at very end of post?](https://wordpress.org/support/topic/twitter-oembed-not-working-at-very-end-of-post/)
 *  Thread Starter [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years ago](https://wordpress.org/support/topic/twitter-oembed-not-working-at-very-end-of-post/#post-4704120)
 * The problem was in my theme. We are appending a clearing div to the end of our
   post content, and we were doing so without first inserting a newline character.
   As a result, an embed link at the very end of a post was failing to trigger the
   WordPress embed feature because it was no longer on a line by itself. Adding 
   a newline character before our appended HTML fixed the problem.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] Uninstall impossible!](https://wordpress.org/support/topic/uninstall-impossible/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/uninstall-impossible/#post-4775253)
 * Just do what the error suggests and delete (or move) advanced-cache.php and db.
   php. If you re-activate W3TC in the future those files should be recreated automatically.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] Uninstall impossible!](https://wordpress.org/support/topic/uninstall-impossible/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/uninstall-impossible/#post-4775192)
 * Once you get back in to your site, you should be able to safely move the plugin
   folder back to /wp-content/plugins/. The plugin should remain disabled, but none
   of your settings should get lost.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] Uninstall impossible!](https://wordpress.org/support/topic/uninstall-impossible/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/uninstall-impossible/#post-4775191)
 * If you can FTP or SSH into to your server, you can disable the plugin by moving
   the plugin files to another folder. Create a new directory under /wp-content/
   called “plugins.disabled” and move the /wp-content/plugins/w3-total-cache/ folder
   to /wp-content/plugins.disabled/
 * The next time you visit your site, WordPress should automatically disable the
   plugin because it can’t find the files that you moved.
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[W3 Total Cache] How to add expires headers](https://wordpress.org/support/topic/how-to-add-expires-headers/)
 *  [dancriel](https://wordpress.org/support/users/dancriel/)
 * (@dancriel)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/how-to-add-expires-headers/#post-4303929)
 * The links listed in this thread are all from other domains (ad networks, google
   fonts, etc.), not from the domains owned by the comment authors… you can’t control
   the cache settings for content coming from other sites. The solution is to just
   ignore these items in YSlow.

Viewing 15 replies - 1 through 15 (of 57 total)

1 [2](https://wordpress.org/support/users/dancriel/replies/page/2/?output_format=md)
[3](https://wordpress.org/support/users/dancriel/replies/page/3/?output_format=md)
[4](https://wordpress.org/support/users/dancriel/replies/page/4/?output_format=md)
[→](https://wordpress.org/support/users/dancriel/replies/page/2/?output_format=md)