Explore the community Forums Lectora Lectora Questions & Answers Persistent Data was not able to be stored Reply To: Persistent Data was not able to be stored

#399003 Score: 0
Profile photo of approg
approg
Member
beginner
intermediate
curious george
wise owl
contributor
friend finder
picture perfect
22 pts
@approg

It’s a bug that’s been in Lectora for years. Lectora encodes data and then compares the length of unencoded data to the encoded data and throws up the error when it doesn’t match.

 

The fix is to either

  1. edit the js to compare like with like or
  2. to not title any pages with characters that change when they get encoded (eg “,6,” will become “%2C6%2C” and thus fail the comparison test).

For 1, in trivanits-cookie.js find the section that reads SetSuspendData(newData); (around line 875) and change

if( chkdata.length < newData.length ) {
bErr = true;
}

to

if (chkdata.length < newData.length) {
if (chkdata != Decode(newData)) {
bErr = true;
}
}