I’m having an issue where if a user, that is not registered is browsing the marketplace listings and clicks on a username that posted the listing, they are directed to a 404 page.
The profile page only shows up if they are logged in. How can I redirect users that click on a username to be redirected to a login/registration page?
The marketplace is not private.
Here is the link to the website https://www.rentspace.io/
When browsing the listings, try clicking the username of the person that has posted the listing. It will redirect you to a markeplace unavailable message
Thanks for sharing those details! Quite strange indeed.
I can’t think of anything right now however note that the page displayed isn’t a 404 page but a 500 page, a server error.
The page may exist but the application/server isn’t able to deliver it for some reason.
One good way to move forward would be to check your logs and see if there’s any information there, probably you’ll be able to find more details about the server error.
@thomasmalbaux Thank you for your assistance. Yes the issue is in the code. Receiving an error message that inbox_path is undefined even though it is defined, it’s also in routes.rb file. Also it means that it actually works while user is logged in.
get "/people/:person_id/inbox/:id", :to => redirect("/fi/people/%{person_id}/messages/%{id}")
...............................................................................................
resource :inbox, :only => [:show]
resources :messages, :controller => :conversations do
collection do
get :received, to: 'inboxes#show'