How to Load the site Home page, Click a link to open different page, and then click a link back to home page without a 409 reload #1891
-
Version:@inertiajs/vue3 version: 1.1.0 Describe the problem:I am having one hell of a time preventing a reload on my basic blog. This blog is a pretty simply Laravel 10 blog site (VITE). I upgraded it to Laravel 11 and add Vue/Inertia pretty recently. Here's the repo, should be up to date for purposes of this question (Make sure you have the right branch - /Rubrasum/setup/update_to_use_vue) Video of what I'm trying to accomplish Now here you can see the problem in action. I would basically like to click a Link in the Home page, then be able to click back to the home page without a full reload. After playing with this for over two days I have determined it must be the version of the page that is causing this to return 409 and refresh. I have tried with just about every orientation of data and checked the returning data, and even when it perfectly matches I am getting this error. However, if I set a Link to the Home page from the home page, I can check console log onUpdated and see that it was updated successfully. I have also checked these places for an answer but with little success: (Apologies, I just found this one so I'll try it tomorrow morning, and I am using Ziggy) #1235 (comment) Relevant files.
Here's my
The remaining bits are just the Link on the Home page, which is nested inside a couple other elements:
And the link back to home is here. It's not nested into any components just straight on the Post.vue page
Steps to reproduce:I have not tested a fresh deploy in a while but that Github link above is public
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You're using two different versions of the Inertia JS library, namely You'd also want to remove |
Beta Was this translation helpful? Give feedback.
You're using two different versions of the Inertia JS library, namely
@inertiajs/inertia-vue3
and@inertiajs/vue3
. The first is <1.0, the latter is 1.x. Using both would result in conflicts. So, remove@inertiajs/inertia-vue3
and use the imports from@inertiajs/vue3
, such asimport { Link } from '@inertiajs/vue3'
You'd also want to remove
@inertiajs/server
and instead useimport createServer from '@inertiajs/vue3/server'