No Sign Out option for user in Help Center
답변함I am not getting the Sign Out option in the drop down menu for users in Copenhagen theme.
I am not sure why it is not showing.
You were very helpful with my other issue - sorry to bug you but ZD support is not answering tickets super fast and need help with this.
Where would I look to see why I do not have the option to sign out. I get no drop down at all for some reason. I am sure I did something! The drop down menu will not show when clicking on the arrow beside my name.
Thank you,
~Donna
-
Hey Donna,
Follow the below steps -
1). Go to the header.hbs file.
2). Find the code, see the given screenshot , your code would be written like this -
For copy and paste - if something missing then you can copy the below code and replace it with your code.
{{#if signed_in}}
<div class="user-info dropdown">
<button class="dropdown-toggle" aria-haspopup="true">
{{user_avatar class="user-avatar"}}
<span class="hide-on-mobile">
{{user_name}}
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" focusable="false" viewBox="0 0 12 12" class="dropdown-chevron-icon" aria-hidden="true">
<path fill="none" stroke="currentColor" stroke-linecap="round" d="M3 4.5l2.6 2.6c.2.2.5.2.7 0L9 4.5"/>
</svg>
</span>
</button>
<div class="dropdown-menu" role="menu">
{{link "my_activities" role="menuitem"}}
{{my_profile role="menuitem"}}
{{change_password role="menuitem"}}
{{link "sign_out" role="menuitem"}}
</div>
</div>
{{else}}
{{#link "sign_in" class="sign-in"}}
{{t 'sign_in'}}
{{/link}}
{{/if}}3). That code is for User Info
4). Close preview mode of your theme showing like this on preview mode at the header area.
Click on your name and see the output-
Still not showing then you can share the public URL of your Help Centre I'll figure out what's the issue :), but your buggy theme set as live, so I can see here.
Thanks
Team Diziana
-
Or maybe the dropdown is hiding due to any CSS code.
-
Thank you. Copied what you shared.
Portal Theme is currently live and this is where I am having issues: https://gradecam.zendesk.com/hc/en-us
Allows me to sign in but not out:
Also - in the preview you will see 4 categories on the preview but when it is live it only shows 3 categories like above
thank you for your help in this.
~Donna
-
Hi Donna, that's because your jQuery is bugging your dropdown. I think you didn't add jQuery CDN in head tag that's why the error is 'en-us:141 Uncaught ReferenceError: $ is not defined'.
First of all, add the CDN of jQuery. Go to the document_head.hbs file and add the given CDN.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
Screenshot for the same:
If you have already multiple files added in the document_head.hbs file then add the CDN at the end of <link .....> stylesheet CDN like in the given screenshot because the JS loads after the CSS.
See, you have all options in the dropdown but due to jQuery bug that's not showing.
Your second question's answer is, your fourth category have articles those are not set view permission as Everyone that's why the category is hiding on end user.
Go to your articles of that buggy category and set all articles as Everyone.
Otherwise, create a demo category, and then demo section under that category and then create a demo article under that section and set that view permission Everyone.
Test that on homepage if that's showing on end user then figure out what's the reason.
Thanks
-
This is what I am seeing in the console - I can't get the dropdown to show to log out.
Thanks,
~Donna
-
Hi Donna,
Your script code needs closing DOM function. You have missed a closing bracket in your script file.
Add the closing bracket at the end of all code - });
See in the screenshot, I have added - line no. 405
-
Thank you - I can sign out now but as you can see - what in the world is going on when a user signs out? And when I sign out as an end user, I still only see 3 categories. I have checked all articles and made demo articles for the GradeCam Admin Support Tutorials but not finding the error.
See video of what happens when I sign out - which now doesn't allow me to sign back in - I do have the sign in redirecting right to the activities so that may be messing things up:
https://drive.google.com/file/d/1W2wxv99sADORo3LNt4D16y_F73WzoHZ8/view
~Donna
-
Donna, I tried it to figure out but can't sign in and having problem. Can you share he credential of your Help centre on my gmail id (ifrasaqlain@gmail.com) so I can figure out what's going wrong and share the solution here.
I have seen your script code via page source and your script code is fine now.
I am damn sure something is going wrong in the theme because when I open the HC theme previously , I haven't seeing this loading bug.
-
Oh I am sure I have messed something up haha
How do I share the credential to you?
~Donna
-
Username and password, which you use to sign in your help centre workbench, share to ifrasaqlain@gmail.com
workbench screenshot which you login:
-
See, you have write the custom code in wrong function.
Your current code is (at the end):
It should be like this:
-
Thank you for the thorough assistance on this problem, Ifra! It was very helpful to see your debugging process.
I found this ticket while encountering the same problem. Turns out the root of my issue was slightly different though. According to the official documentation, the sign out link is hidden in preview mode. Consequently, I never saw it while testing my code. I'm not sure why it is this way, but have made a Community Feedback post to understand/see if it can be changed!
-
Thank you for the thorough assistance on this problem, Ifra! It was very helpful to see your debugging process.
Thanks :)
댓글을 남기려면 로그인하세요.
13 댓글