Updating default route

Hi. I wanted to change the default route which is #dashboard to #ticket/view
in default_route.coffee, i found this snippet of code
if @Config.get(‘default_controller’)
@navigate @Config.get(‘default_controller’), { hideCurrentLocationFromHistory: true }
and when i searched about default_controller, i found it in db/seeds/settings.rb
and i changed the state form #dashboard to #ticket/view, but it didn’t work when i tested, it still returns #dashboard

I tried to run these command also to rebuild the sttings file and update the coffee file
zammad run rake zammad:db:rebuild
zammad run rake assets precompile

Hi @AhmedMohsen.

How did you update the setting? Directly in the file? If yes, this is wrong and will not work.

Hi @fliebe92.
Yes, that’s what I did. Okay, what can I do in order to achieve this?
Thank you in advance.

Hi @AhmedMohsen.

zammad run rails r 'Setting.set("default_controller", "#ticket/view")' should do the trick.

1 Like

Thanks @fliebe92. It worked ,but I got another problem
when I request https://hostname and I didn’t log in to the system it redirects me to https://hostname/#ticket/view also not #login as supposed

I’ve attached the code I edited in default_route.coffee

@AhmedMohsen: This is a bug that is already reported: Visiting any /#ticket/ link while not signed in only shows a blank page and does not redirect to login screen · Issue #4664 · zammad/zammad · GitHub

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.