saeedn's avatar
Level 1

Laravel Nova Tool Navigation Issue

I've created a custom tool in Laravel Nova that contains two Vue components loaded within the main Tool.vue component. While the tool itself works perfectly when loaded, I'm encountering a navigation issue:

Current Behavior:

  • The tool loads and functions correctly initially
  • When trying to navigate to other Nova pages (resources or tools):
    • The URL changes correctly
    • But the new page content fails to load
  • Refreshing the page manually fixes the issue temporarily

Expected Behavior:

  • Smooth navigation between the custom tool and other Nova pages without requiring page refresh

Environment

  • Laravel Nova version: 4.25.1
  • Laravel version: 10.10

Question

Has anyone encountered similar navigation issues with custom Nova tools? I suspect there might be something in my tool's implementation that's interfering with Nova's navigation system.

Would appreciate any insights on:

  1. Common causes of this behavior
  2. Best practices for handling component cleanup when navigating away from custom tools
  3. Potential solutions to maintain smooth navigation

Additional Context

Happy to share relevant code snippets if needed.

0 likes
4 replies
all4sports's avatar

I just encountered the exact same issue.

No errors are shown in the console. Request for new page is successful, but after that everything halts and no further requests are made.

This is in Nova: 10.48.25

When i make new tool with nothing in but the stuff that is generated. It works though

all4sports's avatar

Ok, i solved it! You need a wrapper div inside your tools vue page.

1 like
garrettmassey's avatar

@all4sports I just encountered this issue as well, and it's truly the most bizarre thing. Do you have any idea why this is the case?

indivitech-dev's avatar

Hi all,

I encountered this bug today and I found it's cause after spending 2 - 3 hours on it. I was putting a comment line on top of my wrapper "div" just under the "template". This single comment line was causing this bug. It was fixed after I removed it.

Please or to participate in this conversation.