TinyPortal

Themes. => Bloc Themes (free) => Topic started by: Ken. on January 27, 2016, 05:20:41 PM

Title: Log-Out issues, WorkDesk3
Post by: Ken. on January 27, 2016, 05:20:41 PM
SMF 2.0.11
TinyPortal 1.2
Theme = WorkDesk3
Our FamilyForum (http://www.ourfamilyforum.org/FamilyForum/index.php?action=forum)

Members (all) are not able to log-out from the forum in this theme, members are able to log-out when using the SMF Default theme.
Has there been an issue reported on this problem?

Thanks... Ken.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 27, 2016, 05:44:49 PM
Just tried this theme on my test site and the log-out function works as it's supposed to, so there's some kind of conflict in my mods/themes or whatever that's causing the issue on my site.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 27, 2016, 09:54:44 PM
your link to log out is missing the session id

http://www.ourfamilyforum.org/FamilyForum/index.php?action=logout

http://www.tinyportal.net/index.php?action=logout;a481ba5c90c=d99a3bf34ff00c9ea306e3813b2184d1

you have a link to where you downloaded the theme and i can take a look? it seems to have its own menu somewhere that must be causing the issue.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 27, 2016, 10:26:07 PM
yep looked into it further there is a custom menu as part of the theme. i still need a copy of the theme to see if i can fix it at all.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 12:28:32 AM
OK, thanks for looking.
This theme is not available on any download link that I'm aware of, so I'll send you a PM.
Title: Re: Log-Out issues, WorkDesk3
Post by: lurkalot on January 28, 2016, 08:17:06 AM
Ken, when you rebuilt your site, did you actually uninstall and reinstall that theme?  Just wondering, as you still have menu items left over from your original setup. For example the Coppermine gallery which no longer exists etc.

I thought you were also running another menu mod at some point, although I don't see it now.
Title: Re: Log-Out issues, WorkDesk3
Post by: lurkalot on January 28, 2016, 09:06:09 AM
To add to my post above, (had to quickly nip out).  ::)

As you said it works fine on your testsite, and to be honest I've had it installed on testsite-one for a couple of years or more, and it works fine there as well, just checked it.

Your logout seems to be a custom added button rather than the original one that should have been picked up.

Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 09:58:05 AM
You are right on all counts Mick.
As to the rebuild, the theme was removed and reinstalled after, but those menu options were still in place IIRC... I'll try removing all of the links and custom settings to see if that helps.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 10:05:42 AM
Quote from: Ken. on January 28, 2016, 09:58:05 AM
I'll try removing all of the links and custom settings to see if that helps.

if you dont use the custom menu that will fix the issue. otherwise it will take some effort to solve this.

i just installed the theme you pm'ed me, and it seems the logout option is hard coded where on your forum it is able to be edited...no idea why there are differences there.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 11:30:50 AM
Fixed the Log Out issue by doing an edit to that menu option... thanks to Illori for the logout session id tip (http://www.tinyportal.net/index.php?topic=35706.msg288024#msg288024).  O0

Now it just needs the rest of the menu options sorted out.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 12:31:57 PM
what edit did you do? i tried a few and could not get it to fix.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 01:06:48 PM
In the Custom Menu Manager click on the edit button (https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fwww.ourfamilyforum.org%2FFamilyForum%2FThemes%2Fworkdesk3_smf202%2Fimages%2Ftheme%2Fmy_edit.png&hash=61384bb02791997513f318331aac696c6602c738) by the LogOut entry and then place the link in the URL box.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 01:11:26 PM
Quote from: illori on January 28, 2016, 12:31:57 PM
what edit did you do? i tried a few and could not get it to fix.

I wonder if we were both thrashing around in those settings at the same time?  ;D
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 01:22:20 PM
Errr... Ummm... well, maybe not so fast!  :o
Just trying with my test user (Mia) and it's not working for that user.


EDIT:
Skhilled reports that it's not working for him either.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 01:28:08 PM
right the session id is unique to each session the user is using. can you try to completely uninstall and remove the theme and reinstall it?
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 01:28:55 PM
OK, I'll give that a try.
May need to uninstall and reinstall some of the mods as well.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 02:31:37 PM
Did the uninstall-reinstall, including an uninstall-reinstall on most of the other mods and ended up with the same result.

Set the forum back to the Outline theme for now and will have to continue the search for a new theme.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 02:40:46 PM
you went to the listing of all themes in the admin panel... admin -> themes and layout ->theme settings and clicked the x to remove the theme then deleted the files?

what exactly are you looking for in a theme?
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 05:09:32 PM
Something simple with light colors and soft contours. I've always been a big fan of the lighter themes that Bloc designed. Don't care much for dark themes.

In past times I've used Silent Wave by DzinerStudio and may pick it again, but would rather find something with a little more pop.
http://www.ourfamilyforum.org/FamilyForum/index.php?action=forum;theme=62
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 05:39:14 PM
maybe http://www.simplemachines.org/community/index.php?topic=499448.0 would work for you?
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 05:49:13 PM
Theme link gives me a 'not found' error?
Title: Re: Log-Out issues, WorkDesk3
Post by: lurkalot on January 28, 2016, 05:52:40 PM
Quote from: illori on January 28, 2016, 05:39:14 PM
maybe http://www.simplemachines.org/community/index.php?topic=499448.0 would work for you?

Illori, dead link by the look of it. "Sorry but that theme wasn't found"
Title: Re: Log-Out issues, WorkDesk3
Post by: lurkalot on January 28, 2016, 05:54:17 PM
Quote from: lurkalot on January 28, 2016, 05:52:40 PM
Quote from: illori on January 28, 2016, 05:39:14 PM
maybe http://www.simplemachines.org/community/index.php?topic=499448.0 would work for you?

Illori, dead link by the look of it. "Sorry but that theme wasn't found"

EDIT: yes, what Ken said.  :D
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 05:56:39 PM
then it was removed from the mod site, but if you want it i can get you a copy. it is same theme i am using on my smf help site.
Title: Re: Log-Out issues, WorkDesk3
Post by: lurkalot on January 28, 2016, 06:00:20 PM
Ken, did you have to ad that logout button to the menu? I only ask because you shouldn't have to. It should ick up all the existing menu items by itself when you install it.

Illori, would hooks left over from a previous menu mod be the cause?
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 06:12:44 PM
that theme has its own menu mod built in. when i installed it, the log out button was added like the rest, you cant "edit" or "delete" it. on ken's install you can edit/delete it, so something is wrong with how it got installed i think that is making it not pull that button correctly.
Title: Re: Log-Out issues, WorkDesk3
Post by: lurkalot on January 28, 2016, 06:31:01 PM
Quote from: illori on January 28, 2016, 06:12:44 PM
that theme has its own menu mod built in. when i installed it, the log out button was added like the rest,


Exactly, that's what I was saying above. I was wondering as there was (before the site rebuild) another menu mod installed, which isn't there now, if that might have something to do with it. 
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 06:51:18 PM
i would think if the entire theme was removed then it would try to rebuild the menu. i would need to find out where the menu is stored and see if we can remove those entries from the database and go from there.
Title: Re: Log-Out issues, WorkDesk3
Post by: lurkalot on January 28, 2016, 06:58:13 PM
Quote from: illori on January 28, 2016, 06:51:18 PM
i would think if the entire theme was removed then it would try to rebuild the menu. i would need to find out where the menu is stored and see if we can remove those entries from the database and go from there.

That's what I was thinking, but I have to admit I did look at a couple of my test databases earlier, but couldn't for the life of me see where that info was.  I'll hopefully learn something from your findings.  ;)
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 08:39:22 PM
I don't recall ever having an issue with the theme before, but as noted earlier, I rarely ever log out so the issue may have been ongoing for a while and I just did not notice.

Mick, I did have to add the logout link to the menu because it was not showing when the theme was installed.

Illori, thanks for the theme link... the Silent Wave looks a lot like yours, plus some color in the header.  It is already installed, so for now it will serve, meanwhile I'll keep looking.  :)
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 08:54:09 PM
i wonder if it may be easier to remove the custom menu and revert it back to the default manu... would that work for you?
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 28, 2016, 08:59:46 PM
Yes that would work.
The custom menu is nice to have, but it's obviously not working, so removing it would be a good option.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 28, 2016, 11:44:05 PM
take a backup of index.template.php

find this function and replace it with the following

// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
global $context, $settings, $options, $scripturl, $txt;

echo '
<div id="main_menu">
<ul class="dropmenu" id="menu_nav">';

foreach ($context['menu_buttons'] as $act => $button)
{
echo '
<li id="button_', $act, '">
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="responsive_menu ', $act, '"></span>

<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>
</a>';
if (!empty($button['sub_buttons']))
{
echo '
<ul>';

foreach ($button['sub_buttons'] as $childbutton)
{
echo '
<li>
<a href="', $childbutton['href'], '"', isset($childbutton['target']) ? ' target="' . $childbutton['target'] . '"' : '', '>
<span', isset($childbutton['is_last']) ? ' class="last"' : '', '>', $childbutton['title'], !empty($childbutton['sub_buttons']) ? '...' : '', '</span>
</a>';
// 3rd level menus :)
if (!empty($childbutton['sub_buttons']))
{
echo '
<ul>';

foreach ($childbutton['sub_buttons'] as $grandchildbutton)
echo '
<li>
<a href="', $grandchildbutton['href'], '"', isset($grandchildbutton['target']) ? ' target="' . $grandchildbutton['target'] . '"' : '', '>
<span', isset($grandchildbutton['is_last']) ? ' class="last"' : '', '>', $grandchildbutton['title'], '</span>
</a>
</li>';

echo '
</ul>';
}

echo '
</li>';
}
echo '
</ul>';
}
echo '
</li>';
}

echo '
</ul>
</div>';
}
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 10:44:56 AM
OK, thanks for that Illori.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 10:53:13 AM
That edit returns a blank page:
http://www.ourfamilyforum.org/FamilyForum/index.php?action=forum;theme=61
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 29, 2016, 12:22:32 PM
somehow you must have copy/pasted wrong or something, there were lots of blank lines when i copied out the code you had used. i tried it again and the link you posted is now working. the log out link now has the correct session id in it as well.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 12:55:21 PM
I thought as much, although the edits were tried three times with the same bad result after each edit.

So, you made the correct edits?
It works as expected now... Thanks Illori, you are the best.  8)
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 01:31:49 PM
Umm... now it's blowing up the error log.  ^-^

Quote
http://www.ourfamilyforum.org/FamilyForum/index.php?topic=1295.15
8: Undefined index: can_neg_rep
File: /home/ourfamil/public_html/FamilyForum/Themes/workdesk3_smf202/Display.template.php
Line: 431

http://www.ourfamilyforum.org/FamilyForum/index.php?topic=1295.15
8: Undefined index: can_pos_rep
File: /home/ourfamil/public_html/FamilyForum/Themes/workdesk3_smf202/Display.template.php
Line: 431

http://www.ourfamilyforum.org/FamilyForum/index.php?topic=1295.15
2: Invalid argument supplied for foreach()
File: /home/ourfamil/public_html/FamilyForum/Themes/workdesk3_smf202/Display.template.php
Line: 347

http://www.ourfamilyforum.org/FamilyForum/index.php?topic=1295.15
8: Undefined index: bars
File: /home/ourfamil/public_html/FamilyForum/Themes/workdesk3_smf202/Display.template.php
Line: 347

http://www.ourfamilyforum.org/FamilyForum/index.php?topic=1295.15
8: Undefined index: power
File: /home/ourfamil/public_html/FamilyForum/Themes/workdesk3_smf202/Display.template.php
Line: 344

http://www.ourfamilyforum.org/FamilyForum/index.php?topic=1295.15
8: Undefined index: karma_power
File: /home/ourfamil/public_html/FamilyForum/Themes/workdesk3_smf202/Display.template.php
Line: 344
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 29, 2016, 01:43:23 PM
are you using a karma mod? can you attach that file to your next post?
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 02:43:11 PM
It was turned on, turned it off but the errors keep coming. What file do you need?
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 29, 2016, 02:47:37 PM
File: /home/ourfamil/public_html/FamilyForum/Themes/workdesk3_smf202/Display.template.php

the file mentioned in the error message :P

which mod is it?
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 03:30:18 PM
Ummm... OK.  ;D
For the karma, it's just the built in SMF karma system, not one of the actual mods. Although there was one installed in the past.


EDIT: ... to remove attachment.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 29, 2016, 03:44:34 PM
keep a backup of that file... try the attached file

whatever karma mod you had installed had bits left in the file.


EDIT: ... to remove attachment.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 07:02:43 PM
OK, here's a question on this /Display.template.php file:

If; after I renamed the file to "/Display.template-old.php" (my normal routine) I refreshed the forum page and it display's as expected. So, this means that when the theme didn't find it's own copy of "/Display.template.php" it then pulled from the SMF default theme file... is that correct?

So, if this is true; should the "/Display.template.php" be instaled to this themes folder, or skipped because it works without this file?

Hope that's all clear.  :)

Ps: Thrashing around for a few minutes and not seeing any errors in the logs.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 29, 2016, 07:46:35 PM
yes if the theme does not have that file it will pull from the default theme. that theme has a lot of custom stuff like the blogs etc so it may need the custom file to display that.

if you are happy, please remove the attachments as from what i can see this was not a free theme.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 29, 2016, 08:41:52 PM
Quote from: illori on January 29, 2016, 07:46:35 PM
yes if the theme does not have that file it will pull from the default theme. that theme has a lot of custom stuff like the blogs etc so it may need the custom file to display that.

if you are happy, please remove the attachments as from what i can see this was not a free theme.

OK, the attachments and the download will be removed.

I'll keep digging through the theme to see if it needs any functionally restored and if so I'll install your edited file. Actually I'll go ahead and install it as part of the testing and probing process.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 30, 2016, 03:51:36 PM
Still no errors in the logs!   O0

This theme seems to be OK now.
I loaded the Display.template.php file back into the theme and it didn't seem to make any difference. It will stay in place for now, but it can easily be removed again if any issues arise.
Title: Re: Log-Out issues, WorkDesk3
Post by: illori on January 30, 2016, 06:36:55 PM
that is good to hear.
Title: Re: Log-Out issues, WorkDesk3
Post by: Ken. on January 30, 2016, 09:12:44 PM
Quote from: illori on January 30, 2016, 06:36:55 PM
that is good to hear.

Thanks for your help... you are the best!  O0