question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Tabs on component pages have incorrect paths

See original GitHub issue

The Problem

If you have a pathPrefix (i.e., https://www.gatsbyjs.org/docs/path-prefix/), then generated paths for component page tabs are incorrect. See here: https://jendowns.github.io/gatsby-theme-carbon/components/accordion/code (make sure there’s no trailing slash, otherwise currentTab is empty 😬 )

So all of your tab paths on component pages will 404.

Testing Instructions

To demonstrate this, I made a sample repo ( https://github.com/jendowns/gatsby-theme-carbon) by forking gatsby-theme-carbon and then did this:

The key is that you need to deploy to an environment, like Github Pages, that has subdirectories in the path.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
vpiconecommented, May 10, 2019

I’m pretty sure I know what’s up. Hoping to get this out tomorrow.

1reaction
vpiconecommented, Apr 30, 2019

Hey Jen! We can (and should) have brought the path prefix in by default there, I’ll check it out.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tab nav loading into wrong router-outlet · Issue #4052 - GitHub
In my app.template I have the main router-outlet defined. ... const ROUTES: Routes = [ { path: '', component: ProfileComponent, children: [ {...
Read more >
Add and Customize Tabs on Lightning Pages Using the ...
With the Lightning App Builder, you can create, update, delete, and change the order of tabs and tab sets on record and Home...
Read more >
Wrong React Routing redirect with tabs - Stack Overflow
it shows main page with tabs. It does not redirect. I tried to solve the problem by taking out error component from tab...
Read more >
Solved: Unable to use Tabs Component - Esri Community
Hello! I'm trying to use the <Tabs> component in a custom widget on ExB dev edition 1.5. The component is defined on the...
Read more >
UI Builder - Record Page Tabs component: Hide - ServiceNow
Hi all, i am working on a workspace and they would like to have the overview tab gone from the page. Is there...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found