Wix code and Password protected pages

Hello,

I realize that my wix-code doesn’t work on password protected pages on wix.

For example, I put a code that counts some items from my database, and show it as a text on a password protected page. The text stays unchanged, seems like the code was never running.
BUT! If i remove the password protection, it works just fine. It’s also work on the editor’s preview.

Any suggestions?

Thx.

Hi,
Please share the code you are using so we can inspect the problem.

import wixData from ‘wix-data’;

let MaterialsCount = 0;
let OtherCount = 0;
let SoftwareCount = 0;
let IndustrialCount = 0;
let ChembioCount = 0;
let IndividualsCount = 0;
let TeamsCount = 0;
let AllCount = 0;

wixData.query(“123FormBuilder_4087737”)
.contains(“Email”, “@”)
.count()
.then( (num) => {
AllCount = num;
$w(“#AllCount”).text = AllCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );

wixData.query(“123FormBuilder_4087737”)
.contains(“Sign up as:”, “Team”)
.count()
.then( (num) => {
TeamsCount = num;
$w(“#TeamsCount”).text = TeamsCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );

wixData.query(“123FormBuilder_4087737”)
.contains(“Sign up as:”, “Individual”)
.count()
.then( (num) => {
IndividualsCount = num;
$w(“#IndividualsCount”).text = IndividualsCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );

wixData.query(“123FormBuilder_4087737”)
.contains(“Area of interest/Expertise”, “Chemist/Biologist”)
.not(
wixData.query(“123FormBuilder_4087737”)
.startsWith(“Area of interest/Expertise”, “Other:”)
)
.count()
.then( (num) => {
ChembioCount = num;
$w(“#ChembioCount”).text = ChembioCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );

wixData.query(“123FormBuilder_4087737”)
.contains(“Area of interest/Expertise”, “Industrial design”)
.not(
wixData.query(“123FormBuilder_4087737”)
.startsWith(“Area of interest/Expertise”, “Other:”)
)
.count()
.then( (num) => {
IndustrialCount = num;
$w(“#IndustrialCount”).text = IndustrialCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );

wixData.query(“123FormBuilder_4087737”)
.contains(“Area of interest/Expertise”, “Materials”)
.not(
wixData.query(“123FormBuilder_4087737”)
.startsWith(“Area of interest/Expertise”, “Other:”)
)
.count()
.then( (num) => {
MaterialsCount = num;
$w(“#MaterialsCount”).text = MaterialsCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );

wixData.query(“123FormBuilder_4087737”)
.contains(“Area of interest/Expertise”, “Other”)
.count()
.then( (num) => {
OtherCount = num;
$w(“#OtherCount”).text = OtherCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );

wixData.query("123FormBuilder_4087737") 

.contains(“Area of interest/Expertise”, “Software”)
.not(
wixData.query(“123FormBuilder_4087737”)
.startsWith(“Area of interest/Expertise”, “Other:”)
)
.count()
.then( (num) => {
SoftwareCount = num;
$w(“#SoftwareCount”).text = SoftwareCount.toString();
}
)
. catch ( (error) => {
let errorMsg = error.message;
let code = error.code;
} );