This is a strange one. In my Chrome browser where I’m logged into Webflow my filters work great.
On Chrome incognito, plus all other browsers (Safari, Firefox) they don’t work.
@Support-Luis Any ideas what’s going on?
Site:
This is a strange one. In my Chrome browser where I’m logged into Webflow my filters work great.
On Chrome incognito, plus all other browsers (Safari, Firefox) they don’t work.
@Support-Luis Any ideas what’s going on?
Site:
Hey @v11! It seems this code is causing the issue
// Hide/Show save-button and saved-note based on user's saved items
const currentMemberJSON = await window.$memberstackDom.getMemberJSON();
// Drill down into the nested 'data' properties
let memberData = currentMemberJSON;
while (memberData && memberData.data) {
memberData = memberData.data;
}
// Check if the 'adIds' property exists and is an array
const adIdsArray =
memberData.adIds && Array.isArray(memberData.adIds) ? memberData.adIds : [];
// Hide 'save-button' and show 'saved-note' for each CMS item that's in the member's JSON
adIdsArray.forEach((adIdValue) => {
$('.save-button[data-ad-id="' + adIdValue + '"]').hide();
$('.saved-note[data-ad-id="' + adIdValue + '"]').show();
});
This new callback logs the error instead of breaking the script
// Combined CMS Load callback
window.fsAttributes.push([
'cmsload',
async (listInstances) => {
console.log('cmsload Successfully loaded!');
const [listInstance] = listInstances;
listInstance.on('renderitems', async (renderedItems) => {
console.log(renderedItems);
// Ensure Mux script is loaded and reinitialize videos
ensureMuxScriptLoaded(initializeMuxVideos);
try {
// Hide/Show save-button and saved-note based on user's saved items
const currentMemberJSON = await window.$memberstackDom.getMemberJSON();
// Drill down into the nested 'data' properties
let memberData = currentMemberJSON;
while (memberData && memberData.data) {
memberData = memberData.data;
}
// Check if the 'adIds' property exists and is an array
const adIdsArray =
memberData.adIds && Array.isArray(memberData.adIds) ? memberData.adIds : [];
// Hide 'save-button' and show 'saved-note' for each CMS item that's in the member's JSON
adIdsArray.forEach((adIdValue) => {
$('.save-button[data-ad-id="' + adIdValue + '"]').hide();
$('.saved-note[data-ad-id="' + adIdValue + '"]').show();
});
} catch (error) {
console.log('An error has occurred: ', error);
}
});
},
]);
Let me know if this fixes your issue
Legend. I got it working. Thanks man!