Wix-storage working in preview but not published

I’m storing some information in memory to pass to another page.

export function requestQuoteButton_click_1(event) {
// This function was added from the Properties & Events panel. To learn more, visit Velo: Working with the Properties & Events Panel | Help Center | Wix.com
// Add your code for this event here:
memory.setItem( “quoteEmail” , $w( “#partnerEmail” ).text);
memory.setItem( “agentURL” , wixLocation.url);
[wixLocation.to(](wixLocation.to(“/agents-quote”);
}) [“/agents-quote”](wixLocation.to(“/agents-quote”);
}) [);](wixLocation.to(“/agents-quote”);
})
[}](wixLocation.to(“/agents-quote”);
})

On the preview mode everything works perfectly and the data is stored in memory for future access

However, in the published site the memory storing process isn’t working it seems. The console produces the following lines:

Wix code SDK warning: The text parameter of “testerr” that is passed to the text method cannot be set to null.

Wix code SDK warning: The text parameter of “emailToSend” that is passed to the text method cannot be set to null.

testerr and emailToSend are text fields that I’m populating with the stored memory, however, it’s saying that it cannot assign null meaning the memory storing process isn’t storing anything.

Any ideas?

So i’ve tested more, on the initial page, i am able to store and access the values in memory, but for some reason after going to the next page i can no longer access them and theyre null. Any ideas after this info? Do i have some syntax errors?