Can't click "like" on some threads
#16




Join Date: Apr 2024
Posts: 233
I believe I've found the bug: the like code relies on jQuery being available via a variable named $ which is not always the case because some of the third-party scripts ran on the website are overwriting it. There's 2 possible fixes depending on what level of access the admins like IBJoel have:
a. Ensure that jQuery is available via the variable $ by adding additional Javascript to the page via Google Tag Manager which assigns `var $ = jQuery`
b. Modify the file vbseo/resources/scripts/vbseo_ui.js: replace `$("#main-content")` with `jQuery("#main-content")`
Until the issue is fixed by the administrators, individual users can fix it on each page load by running the following code in their browser console:
var $ = jQuery
vbseoui = new vBSEO_UI();
vbseoui.page_init(Array('postbody', 'blogbit', 'content', 'postcontainer', 'vbseo_like_postbit'), Array("php",1));
And that can be made even easier by adding it as a bookmark, so each time you need to enable likes on a page, you can just click the bookmark, e.g:
javascript:var $ = jQuery; vbseoui = new vBSEO_UI(); vbseoui.page_init(Array('postbody', 'blogbit', 'content', 'postcontainer', 'vbseo_like_postbit'), Array("php",1));

Enjoy!
(Apologies to anyone who got notifications of me liking and unliking their posts while I was testing this.)
a. Ensure that jQuery is available via the variable $ by adding additional Javascript to the page via Google Tag Manager which assigns `var $ = jQuery`
b. Modify the file vbseo/resources/scripts/vbseo_ui.js: replace `$("#main-content")` with `jQuery("#main-content")`
Until the issue is fixed by the administrators, individual users can fix it on each page load by running the following code in their browser console:
var $ = jQuery
vbseoui = new vBSEO_UI();
vbseoui.page_init(Array('postbody', 'blogbit', 'content', 'postcontainer', 'vbseo_like_postbit'), Array("php",1));
And that can be made even easier by adding it as a bookmark, so each time you need to enable likes on a page, you can just click the bookmark, e.g:
javascript:var $ = jQuery; vbseoui = new vBSEO_UI(); vbseoui.page_init(Array('postbody', 'blogbit', 'content', 'postcontainer', 'vbseo_like_postbit'), Array("php",1));

Enjoy!
(Apologies to anyone who got notifications of me liking and unliking their posts while I was testing this.)
Last edited by s3m; Jul 31, 2024 at 11:45 am Reason: Added spacing to prevent code being broken up
#18




Join Date: Jul 2009
Location: Washington, DC
Programs: DL PM; Hilton Dia; Marriott Titanium/LT Gold
Posts: 8,509
Flagged for mods to move to https://www.flyertalk.com/forum/tech...-feedback-386/
#19
Community Director Emerita




Join Date: Oct 2000
Location: Anywhere warm
Posts: 35,569
#20



Join Date: Aug 2002
Location: San Francisco
Posts: 2,959
#21
A FlyerTalk Posting Legend, Moderator, Information Desk, Ambassador, Alaska Airlines



Join Date: Dec 2006
Location: FAI
Programs: AS MVP Gold100K, AS 1MM, Maika`i Card, AGR, Hertz PC, Marriott Lifetime Plat, CO, 7H, BA, 8E
Posts: 44,318
Please follow the redirect as we relocate this query.
~beckoa, co-moderator Information Desk
~beckoa, co-moderator Information Desk
#22
FlyerTalk Evangelist




Join Date: Nov 2009
Location: Northeast Kansas | Colorado Native
Programs: Amex Gold/Plat, UA *G, Hyatt Globalist, IHG Plat Marriott LT Gold, NEXUS, TSA Disparager Unobtanium
Posts: 22,644
Bumping this issue -- unable to like most posts in various Hyatt threads with reviews as noted by SanDiego1K above. IB, any thoughts?
#23
Administrator




Join Date: Sep 2015
Location: Los Angeles
Programs: Internet Brands
Posts: 4,435
We're trying to figure out how to migrate likes over to the new system. But FlyerTalk's current Likes product is deprecated and no longer being worked on

