The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Have to manually re...
 
Share:
Notifications
Clear all

Have to manually refresh the page after logged-in through Twitter or Google

20 Posts
2 Users
0 Likes
1,454 Views
Posts: 14
Topic starter
(@anguschang)
Active Member
Joined: 3 years ago

I am trying to log in with my Twitter and Google accounts. It is successfully logged in but I have to refresh the page manually. However, I have no idea why Facebook no this issue!

19 Replies
Asti
Posts: 7119
 Asti
Support
(@asti)
Illustrious Member
Joined: 6 years ago

Do you have any caching plugins installed on your website? 

Reply
Posts: 14
Topic starter
(@anguschang)
Active Member
Joined: 3 years ago

yes, the original caching plugin from the theme

Reply
7 Replies
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7119

@anguschang,

Please try to deactivate it and check again.  

Reply
(@anguschang)
Joined: 3 years ago

Active Member
Posts: 14

@asti however, it is the core feature that I can't deactivate but there I can exclude the JS files without caching them.

Reply
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7119

@anguschang,

You should exclude the following two files from your caching system:

/wp-content/plugins/wpdiscuz/assets/wpdiscuz-social.js
/wp-content/plugins/wpdiscuz/assets/wpdiscuz.js
Reply
(@anguschang)
Joined: 3 years ago

Active Member
Posts: 14

@asti 

Are you sure the JS files' location is correct?

Because I find those two JS files are in the following location:

/wp-content/plugins/wpdiscuz/assets/JS/wpdiscuz-social.js
/wp-content/plugins/wpdiscuz/assets/JS/wpdiscuz.js

Reply
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7119

@anguschang,

yes, sorry, the correct paths are: 

/wp-content/plugins/wpdiscuz/assets/js/wpdiscuz-social.js
/wp-content/plugins/wpdiscuz/assets/js/wpdiscuz.js

Reply
(@anguschang)
Joined: 3 years ago

Active Member
Posts: 14

@asti 

I use the following code to exclude the JS files but the result is no different!

add_filter('hpp_can_merge_file', function($ok, $handle, $ext, $handles){
		if( in_array($handle,['wpdiscuz-combo-js', 'wpdiscuz-social-js', 'wpdiscuz-js', 'wpdiscuz'])) return 0;
		return $ok;
}, 10, 4);

add_filter('hpp_allow_delay_asset', function($ok, $url){
		if(strpos($url, 'plugins/wpdiscuz/assets/js/wpdiscuz-combo.min.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/js/wpdiscuz-social.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/js/wpdiscuz.js')!==false) return false;
		return $ok;
}, 10, 2);
Reply
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7119

@anguschang,

Have you deleted all kind of caches after you put the code? 

Reply
Posts: 14
Topic starter
(@anguschang)
Active Member
Joined: 3 years ago

@asti 

yes, all caches are purged from the theme or Cloudflare

Reply
Posts: 14
Topic starter
(@anguschang)
Active Member
Joined: 3 years ago

@asti

I am trying to ignore more JS files but I am getting the same result.

add_filter('hpp_can_merge_file', function($ok, $handle, $ext, $handles){
		if( in_array($handle,['wpdiscuz-cookie-js','autogrowtextarea-js', 'wpdiscuz-ajax-js', 'wmu-colorbox-js', 'wpdiscuz-mu-js', 'wpdiscuz-lity-js', 'wpdiscuz-user-content-js', 'wpdiscuz-social-js'])) return 0;
		return $ok;
}, 10, 4);

add_filter('hpp_allow_delay_asset', function($ok, $url){
		if(strpos($url, 'plugins/wpdiscuz/assets/third-party/wpdccjs/wpdcc.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/third-party/autogrow/jquery.autogrowtextarea.min.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/js/wpdiscuz.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/third-party/colorbox/jquery.colorbox.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/js/wpdiscuz-mu-frontend.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/third-party/lity/lity.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/js/wpdiscuz-user-content.js')!==false) return false;
		if(strpos($url, 'plugins/wpdiscuz/assets/js/wpdiscuz-social.js')!==false) return false;
		return $ok;
}, 10, 2);
Reply
Posts: 14
Topic starter
(@anguschang)
Active Member
Joined: 3 years ago

@asti

https://prnt.sc/16c0xp0

The function "Minify JS from the theme" is disabled but I am getting the same result!

Reply
Posts: 14
Topic starter
(@anguschang)
Active Member
Joined: 3 years ago

@asti

I found the issue that is from Cloudflare APO. Please read the following discussion.

https://community.cloudflare.com/t/automatic-platform-optimization-apo-how-to-force-refresh-page-after-logging-in/255980

Can you please update the plugin to match the requirement from Cloudflare?

 
Reply
5 Replies
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7119

@anguschang,

I'm really sorry, but wpDiscuz doesn't have any relation to the issue. It should be fixed by Cloudflare APO.

Reply
(@anguschang)
Joined: 3 years ago

Active Member
Posts: 14

@asti 

But the login with Facebook no this issue! What's the setting Facebook using?

Reply
(@anguschang)
Joined: 3 years ago

Active Member
Posts: 14

@asti 

The following two files are bypassed on Cloudflare's caching system. However, there is no difference!

/wp-content/plugins/wpdiscuz/assets/js/wpdiscuz-social.js
/wp-content/plugins/wpdiscuz/assets/js/wpdiscuz.js

Reply
Asti
 Asti
Support
(@asti)
Joined: 6 years ago

Illustrious Member
Posts: 7119

Probably you can contact the caching system support with this issue. They may find some solution for you. 

Reply
(@anguschang)
Joined: 3 years ago

Active Member
Posts: 14

@asti 

I have discussed this with Cloudflare. They show me that their system hasn't cached those two files anymore! So I have no idea what other is causing this issue!

Reply
Page 1 / 2
Share: