drodil / backstage-plugin-qeta

Backstage.io plugin for Q&A
https://www.npmjs.com/package/@drodil/backstage-plugin-qeta
MIT License
81 stars 25 forks source link

Getting - ERROR 404: PAGE NOT FOUND error on Q and A page #111

Closed dhrupadk closed 9 months ago

dhrupadk commented 9 months ago

Hi, We have integrated Q and A - Backstage Qeta pluging with our Backstage Instance. Followed the installation instruction mentioned in repo. On the UI we are can see the Q and A option in the item list but when clicked on the same we are getting Error 404: Page Not Found. Not sure what we did wrong here. While starting the Backstage as well there is no error coming in the logs either for frontend or backend. Since we are on older version of Backstage i.e. v1.17.0 so havent configured the new backend changes suggested.

Can any one suggest what i have missed in the process which might be causing the same. Any help will be appreciated. Thanks in advance.

drodil commented 9 months ago

You sure you have the route setup in the frontend like the docs say:

const AppRoutes = () => (
  <FlatRoutes>
    // ...
    <Route path="/qeta" element={<QetaPage title="Questions" />} />
    // ...
  </FlatRoutes>
);
dhrupadk commented 9 months ago

Hi @drodil , Yeah, we have set the path on frontend like suggested and added the config on app-config.yaml as well

App.tsx i have mentioned the way i have added the flat routes in the App.tsx

const AppRoutes = () => (

// ... } /> // ...

);

const routes = (

} /> } /> } > {entityPage} } /> } > } /> } /> } /> } /> }> {searchPage} } /> } />

);

Please suggest if i should move the same or any other setup needs to be added.

app-config.yaml we have added qeta tag as well

Attached is the screen shot for the error, which we are getting when we are click on the Q and A.

image
drodil commented 9 months ago

But you don't have qeta in the routes? And missing element as well?

dhrupadk commented 9 months ago

Hi @drodil ,

I am sorry, looks like while copying the app.tsx content here, it was missed somehow.

image

As you can see in the image have added the routes and elements as well in app.tsx. const AppRoutes = () => (

// ... } /> //{

);

Do we need to add the same value in const routes tag as well ? Or is it something else i am missing here ? If yes, can you please suggest , what and where. Sorry for dragging this. and thanks for the quick replies ...

drodil commented 9 months ago

Of course you have to add it to the routes. The AppRoutes does nothing at the moment.

dhrupadk commented 9 months ago

Hi @drodil ,

Thanks a lot for the suggestion. Able to use Q and A plugin now.

And Thanks again for creating such a wonderful plugin. Helps a lot. TA

dhrupadk commented 9 months ago

Thanks @drodil again for the help. Closing this issue now.