Hello everyone! Im having trouble with the second level and it is displaying a 404! Here is my code....
I can display the Countries, then by clicking the selected country i can access the Country with the people names...But when i click on any person name it shows me a 404 but the url path is still correct. Any thoughts on what im doing wrong?
Thank you very much!
{% if dynamic_page_route_level == 0 %} <h1>Countries</h1> {% set rows = hubdb_table_rows(dynamic_page_hubdb_table_id) %}
{% for row in rows %} <h2><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }}</a></h2> {% set childRows = hubdb_table_rows(row.hs_child_table_id) %} {% for childRow in childRows %} <li><a href="{{ request.path }}/{{ row.hs_path }}/{{childRow.hs_path}}">{{ childRow.hs_name }}</a></li> {% endfor %} {% endfor %}
Hi! after several days of troubleshooting and reading documentation and related posts, i found the error! So, this was a rookie mistake that is probably going to help someone in the future! Everytime you make changes to your DB, ALWAYS REMEMBER to publish them! Also, if you make changes in the DB settings make sure you save them as well! I was looking for the error making sure i've follow the correct setup and found up that a simple "save" and publish button was never ever clicked after making some DB changes.
Hi! after several days of troubleshooting and reading documentation and related posts, i found the error! So, this was a rookie mistake that is probably going to help someone in the future! Everytime you make changes to your DB, ALWAYS REMEMBER to publish them! Also, if you make changes in the DB settings make sure you save them as well! I was looking for the error making sure i've follow the correct setup and found up that a simple "save" and publish button was never ever clicked after making some DB changes.
Thank you, @jcromero for taking the time to come back and share your update. It has definitely happened to us all 😊 And you are correct, your post will certainly help other folks in the future!
Thanks again for yor answer! I have admin permissions and im working on a demo page so i can learn to use dinamic pages, do you have any other thoughts on what am i doing wrong? maybe it's still on my code...
The title for my page in set to "latam" so the routes are supposed to be /latam/country/person ? i dont know if im getting it right but thast what im getting... and i guess its OK to be so...or not? For level 0 (latam) im getting all latam countries i want, then on level 1, im getting a single country with the new route /latam/argentina... but for level 2 im getting the 404 error but the url changes properly to /latam/argentina/leandro.... im still not getting it
It looks like there might be an issue with the URL path that you are generating for the person's page.
In your code, you are generating the URL path for the person's page using {{ request.path }}/{{ row.hs_path }}/{{childRow.hs_path}}. This concatenates the current path with the paths for the country and person. However, it looks like you are missing a slash between the country path and the person path, which can cause a 404 error when trying to access the person's page.
To fix this, you can add a slash between the country path and the person path in your URL path generator like this: {{ request.path }}/{{ row.hs_path }}/{{childRow.hs_path}}. This should generate the correct URL path for the person's page and allow you to access it without a 404 error.
Hello and thanks for your answer! Actually in the code i passed, there is a slash where you say and when trying to access the second level, my URL changes correctly like this : /latam/argentina/leandro but still throws back a 404... Havent been able to fix this yet
I see, thank you for the clarification. In that case, it is possible that the issue might be with the configuration of your server or with the routing settings in your code. There might be an issue with the permissions or access settings for the person's page. Make sure that the page is published and accessible to the appropriate users or groups.