After adding a parent to my menuItem in the sidebar the create: AddEmployee is giving 404 error
I have an element called My Business which is a parent element in the sidebar and I have under it Employees and Roles.
However the AddEmployee showing 404 if its have parent element
9 Replies
Hi @acidias. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
To fix the 404 issue when adding a parent element, you need to update your route configuration in the
<Refine>
component. Make sure you have the correct route paths for your resources and their corresponding elements.
Here's an example of how you can set up your routes based on the information you provided:
Make sure to replace EmployeeList
, AddEmployee
, and ManageRoles
with your actual components. This configuration should resolve the 404 issue when navigating to the AddEmployee page.
----------------------
Note: you can ask me a follow up question by @ mentioning me again
:speech_balloon:
----------------------<@134090892167479296> kapa.ai is still learning and improving, please let us how it did by reacting below
sunny-green•16mo ago
Hi @acidias ,
create
should be path, bot's example code is right.
https://refine.dev/docs/tutorial/understanding-resources/index/#defining-actions-for-a-resourceResources | refine
In Unit 2.4, we defined a resource to create our CRUD pages with the Inferencer component but did not explain how it works. We will take care of that in this unit and thoroughly explain the resources prop of the `` component using mock components.
stormy-gold•16mo ago
Thank, I manage to fix this but now its seems there is an extra side.
the 404 error and under it is's showing the AddEmployee
stormy-gold•16mo ago
![No description](https://cdn.answeroverflow.com/1113817971727548426/Screenshot_2023-06-01_at_14.14.37.png)
stormy-gold•16mo ago
So I can scroll down and see it fully, but what is the 404 error?
Also the rest pages work as same (I need to scroll down for the module)
sunny-green•16mo ago
Hmm. This could be for many reasons. if you share reproduced example with me, i will happy to debug
stormy-gold•16mo ago
@alicanerdurmaz This is the return:
This is the return:
sunny-green•16mo ago
probably <AddEmployee> component has issue