symfony / ux

Symfony UX initiative: a JavaScript ecosystem for Symfony
https://ux.symfony.com/
MIT License
806 stars 292 forks source link

Turbo restoration visit displays wrong AJAX #1582

Open DavidPetrasek opened 5 months ago

DavidPetrasek commented 5 months ago

When visiting a specific page by clicking a link and then going back to previous page everything is fine. However, when this is repeated, after going back to previous page the icon on "Symfony Web Debug Toolbar" which represents AJAX request is flashing and shows:


1   [7e31b1]  GET   fetch   200 https://some.site/login 76 ms
2   n/a       GET   fetch   n/a https://some.site/login n/a

Which means it is either performing or showing the wrong AJAX call.

Used versions: Symfony 7.0.3 symfony/ux-turbo v2.14.0 NPM: ├── @hotwired/turbo@7.3.0 ├── @symfony/ux-turbo@0.1.0 -> ./vendor/symfony/ux-turbo/assets

weaverryan commented 5 months ago

It's possible some ajax call is being cancelled... or perhaps the web debug toolbar is getting confused by this. You could look to see what Ajax calls are really happening and when to see if the web debug toolbar is reporting accurately...

DavidPetrasek commented 5 months ago

After checking the real network activity in Firefox's dev tools, it's evident that there is no additional AJAX call triggered when going back in history for the second time. Therefore, the web debug toolbar must be confused in some way.