pkiger
November 2, 2020, 2:02pm
1
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.
Please share your code in a code block as stated in the Forum Guidelines .
pkiger
November 3, 2020, 11:26am
3
Create a test dataset.
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"));
});
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"));
});
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 post the URL of your site.
pkiger
November 3, 2020, 11:40am
5
Try this site: https://pkige4.wixsite.com/mysite
Code are in pages
Home
Services
Motivational Reading
pkiger
November 3, 2020, 3:21pm
7
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
What are the sites that you’re having trouble with? Are they all encountering the same issue?
avigu
November 3, 2020, 6:55pm
9
it is releated to the new imporvements we are rolling out - this was a bug from our side…
pkiger
November 3, 2020, 7:51pm
10
Yes. This is I need to understand what you did to make it work, because by default, is doesnt work as expected
pkiger
November 3, 2020, 7:52pm
11
Ok! This is a good news, because you know where the bug is.
Is already fixed for all sites?
pkiger
November 16, 2020, 1:24pm
12
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.