Popup-Maker icon indicating copy to clipboard operation
Popup-Maker copied to clipboard

Problems with our AssetCache error detection.

Open fpcorso opened this issue 4 years ago • 3 comments

We have had several reports of the AssetCache message being shown but we think the system is working normally.

Copied from @danieliser 's thread in HS: We need to work out the following issues or revert it:

  1. Why its giving false positives so often.
  2. Why they are not getting (or at least not reporting) the notice there was an issue detected.
  3. Why is the asset cache not working if the disable asset cache option isn't checked and the notice isn't showing?

We were able to get the AssetCache working on a site using this code:

If you can try adding the following to your themes functions.php file and see if that helps.

add_action( 'wp_enqueue_scripts', 'custom_force_pm_asset_caching', 11 );
function custom_force_pm_asset_caching() {
wp_deregister_script( 'popup-maker-site' );
$cached = get_option( 'pum-has-cached-js' );

if ( ! $cached ) {
PUM_AssetCache::cache_js();
$cached = get_option( 'pum-has-cached-js' );
}

wp_register_script( 'popup-maker-site', PUM_Site_Assets::$cache_url . '/' . PUM_AssetCache::generate_cache_filename( 'pum-site-scripts' ) . '.js?generated=' . $cached, array( 'jquery', 'jquery-ui-core', 'jquery-ui-position' ), Popup_Maker::$VER, true );
}

fpcorso avatar Jun 04 '20 18:06 fpcorso

@danieliser Since this is a major system, should we add the value for the pum_files_writeable option to our System Info? If we ask for that in support, we'd be able to see what the system has set that option to.

We could also add values for disable_asset_caching too.

fpcorso avatar Jun 04 '20 18:06 fpcorso

@danieliser For point 3 in the issue (the "Why is the asset cache not working"): Is this happening after they received the notification at any point or is this on normal working sites?

fpcorso avatar Jun 04 '20 18:06 fpcorso

@fpcorso I didn't think to ask because I knew the solution on the last 2, but previously only 1 of the other 3 mentioned ever seeing the notification.

Most all said that disable asset caching wasn't checked when they look either which would happen if they saw the notice and dismissed it without trying again.

danieliser avatar Jun 04 '20 19:06 danieliser