I have a form, and in the OnSubmit event, I save something in the storage.local
Then, in the next page, I check, and the value is not there!!
Checking the localStorage in the broswer, i discovered that storage.local values are saved/loaded in two diferente locations:
platform_app_XXXXX for normal pages.
platform_app_databindin_XXXXX for pages with forms.
So, I have no way to transfer data betwwen those pages!!!
Any help?
Thank you.
Mr Avi Guzansky / Yisrael
We are still suffering the same bug. Sometimes localstorage or session doesn't work if the visitor doesn't accept the cookies.
We need help, please!
Tnx in advance.
Ok! This is a good news, because you know where the bug is.
Is already fixed for all sites?
Yes. This is I need to understand what you did to make it work, because by default, is doesnt work as expected
Ok, now works. What you did? Why it wasn't working?
I'm suffering same issue in other sites, and I need to know/understand why it is happening.
Tnx
Try this site: https://pkige4.wixsite.com/mysite
Code are in pages
Home
Services
Motivational Reading
Please post the URL of your site.
1) Create a test dataset.
2) Create a Page 1, without the dataset attached, with this code:
import {session} from 'wix-storage'; $w.onReady(function () { session.setItem("test", "ok"); console.log("test="+session.getItem("test")); });
3) Create a Page 2, with a dataset attached, with this code:
import {session} from 'wix-storage'; $w.onReady(function () { console.log("test="+session.getItem("test")); });
4) Create a Page3, without any dataset, and same code:
import {session} from 'wix-storage'; $w.onReady(function () { console.log("test="+session.getItem("test")); });
Then publish, and test the 3 pages. I'm getting this result:
Page 1: test=ok
Page 2: test=null
Page 3: test=ok
????
Please share your code in a code block as stated in the Forum Guidelines.