Closed wezzou1 closed 6 years ago
Hi @wezzou1,
I'm not sure to understand, Highway seems to change the URL properly, first time you have Malad then Slipad since you change the outfit model. What's the problem ?
Thanks, Anthodpnt
With the fix we pushed yesterday the entry in the cache has the full URL including parameters as key and the page HTML as value. So apparently you should get 2 entries in the cache, one for Malad and one for Slipad. Maybe you could debug it by logging Highway.Core.cache
on NAVIGATE_END
event like this:
// Call of Highway.Core
const H = [...]
// Events
H.on('NAVIGATE_END', () => {
// Debug
console.log(H.cache);
});
This way you'll be able to see what is put in the cache and give us a more detailed description of the problem if it concerns the caching of Highway :).
Thanks, Anthodpnt
@Anthodpnt The problem here is that if I change the "permalink" from Målad to Slipad the selector will not select my option, As you can see when I'm click in to the product the last time, I'm clicking at Slipad and the URL change, but when I'm coming in to the product page it's Målad? when my select was Slipad, The first time works fine, but the next time dosen't
@Anthodpnt
First console.log => Going from product-list in to the product Sec console.log => Going from product, back to product-list Third console.log => Change permalink on product Fourth console.log => Going to the new permalink.
@wezzou1 I think you don't have the v2.0.4 of Highway with the fix we pushed yesterday because the keys of the cache are the pathname of the URLs and we changed it yesterday.
@Anthodpnt Hmm, I tried @dogstudio/highway": "^2.0.4" and seems not to work....
@wezzou1 Did you remove the node_modules folder and the lockfile before reinstalling your modules ?
@Anthodpnt yes, I did!
Can you open the source code of Highway you're using in the node_modules and look for this.cache.set
and send be the line you find please ?
@Anthodpnt this.cache.set(this.location.url, this.properties);
@Anthodpnt and sec line this.cache.set(this.location.pathname, this.properties);
@wezzou1 Can you try v2.0.5 please ? It should completely fix the problem.
@Anthodpnt will try now!
@Anthodpnt hehe... now it's the same issue as it was yesterday with search, if I'm clicking on an another link the transition runs and URL changes, but I'm still at same page...
@Anthodpnt I've got Map(1) {undefined => {…}}
on every single page
@wezzou1 That's really weird, I'll need time more time to fix this one then. I'll let you know when it's done cause I don't have time right now to run deeper tests.
@wezzou1 Nevermind, can you try v2.0.6, I was referring location.url
but it should have been location.href
...
@Anthodpnt will do! :)
Wooop wooop! 👍 It's now working perfect! Thanks again @Anthodpnt!
Awesome !!! 🎉 Really sorry for the back and forth ! Again, thank you for playing with it and sending this kind of useful issues to us.
Hi, I'm wondering if this is a caching problem?, I'm trying to change the URL on click, with right attributes, it's working without highway, because the page is hard refresh on each click, So I'm wondering if you guys know how to fix this problem?
Here is a video that describe the problem! https://drive.google.com/file/d/1YGK8iNx59ep1hzpV_18CO7S5oOEBXbBX/view?usp=sharing