Bug Full Guest Cache Interferes with Browser Detection (Mobile/MSIE) Add On (Redis)

Status
Not open for further replies.

semprot

Customer
Hello.

So i tried to use Redis, and only activates Guest Full Page Caching & Cache Registry.

I also use this add on :
Browser Detection (Mobile/MSIE) | XenForo Community

I use that add on to use if-else in my template, so that desktop users will have different part of the UI than mobile users.

But after i let the Guest Full Page Caching to run for about 5 minutes, when i checked from my computer as guest, i get the mobile cached version.

Thank you.
 
Ok i've found solution :D

Code:
/library/DBTech/Optimise/Model/PageCache.php

Before these lines
PHP:
// sort array
ksort($key);

Add :
PHP:
//Check if mobile
if( class_exists('Sedo_DetectBrowser_Listener_Visitor') && isset($visitor->getBrowser['isMobile']))
{
	//External Addon
	$isMobile = $visitor->getBrowser['isMobile'];
}
else
{
	//XenForo
	$isMobile =  XenForo_Visitor::isBrowsingWith('mobile');
}

$key['isMobile'] = intval($isMobile);

I hope this can be included into your addon's FAQ in XF site, so other users can use this modification too ;)
 
I'm honestly quite shocked the developer of that modification did not just integrate into the $visitor->isBrowsingWith() function, that's really bad form. Regardless, I can add a workaround.
 
I actually have been running into this as well.

Do you run into any issues with the [bd]Widgets as well?
I used [bd] Widgets too.
But i set all widgets cache to long TTL, and my DBT Optimise Guest Cache TTL is long too.

So i have not noticed if there are any issues in [bd] Widgets. :)

UPDATE : when i choose memcached as operator, i have this error :
Code:
ErrorException: array_keys() expects parameter 1 to be array, string given - library/WidgetFramework/Model/Cache.php:50
Generated By: Unknown Account, 5 menit lalu

But i also activated lot of things in DBT Optimise (Cache guest, forum, nodes, post, etc), so maybe one of those options triggers the error on Widget Framework.
 
Last edited:
Yup, so you are able to recreate it. I would love to switch to redis, but I don't believe we can do that at this time...so memcache is the only one we can use.
 
Hello semprot,

This ticket has now been closed with the status Fixed.

We hope your issue or question has been addressed to your satisfaction. If not, please feel free to re-open it by clicking this link.

If you have any further issues or questions, please feel free to start a new support ticket via the button at the top of every page.

Thank you!
 
Status
Not open for further replies.

Legacy DragonByte Optimise

XenForo 1.5.3+
Seller
DragonByte Technologies
Release date
Last update
Total downloads
258
Customer rating
0.00 star(s) 0 ratings
Back
Top