collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 784
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Thanks for having an interest with our portal. If you have any requests for features, have a look at the Feature Requests board.

Author Topic: Standalone menu broken  (Read 5542 times)

0 Members and 1 Guest are viewing this topic.

Offline Sean

  • Newbie
  • Posts: 4
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Standalone menu broken
« on: May 27, 2010, 10:44:38 AM »
Hello,

When I use the standalone option in SimplePortal the main menu on my forum ends up broken. There is no link to the forum itself (should be after "Home"), and what would have been the link gets squished into an orange region on the right side of the menu:



The orange region contains the link to the forum.

Additionally, I get errors like the following in my log for every page that gets visited (not just the forum/index.php page):
Code: [Select]
http://diabolo.ca/forum/index.php?
8: Undefined index: href
File: /srv/www/diabolo.ca/public_html/forum/Themes/default/index.template.php
Line: 422

And
Code: [Select]
http://diabolo.ca/forum/index.php?
8: Undefined index: title
File: /srv/www/diabolo.ca/public_html/forum/Themes/default/index.template.php
Line: 423

Lines 422 and 423 are:
Code: [Select]
<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>
<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>

This happens a lot of the time, but not all the time. It seems to randomly come and go, which seems strange. It usually just affects the site for people not logged in, but I have seen it happen when I've been logged in too. I have never seen it happen when not in standalone mode. My standalone file is named index.php and is in the root domain below /forum. If it helps, the site is: http://diabolo.ca/

Edit - Just in the time it took to make this post it stopped happening again.
Edit2 - Forgot to mention: this is SMF 2.0 RC3 and SimplePortal 2.3.2.

Originally I thought this was just a legacy from old code lingering from a conflicting mod. So, yesterday I made a fresh install of SMF (but still using the old database) and installed only SimplePortal. Same problem.

Any ideas how I can fix this?

Thanks!
« Last Edit: May 27, 2010, 10:55:53 AM by Sean »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #1 on: May 27, 2010, 11:58:35 AM »
Before doing the fresh SMF install, did you uninstall all mods?
When you re-installed SimplePortal, did it pass all tests?
 
Please attach a copy of Subs.php -- that's where the forum button gets created.
 
Next time the problem happens, can you capture the HTML with "view source", save it as a file, and attach it to a post?
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sean

  • Newbie
  • Posts: 4
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #2 on: May 27, 2010, 12:20:52 PM »
Thanks for the quick response.

Subs.php is attached. There are now other mods installed again. Specifically these:



I should clarify, by "re-install" I really meant: archive all the old files to a different folder, download a completely fresh copy of the SMF files, change the Settings.php file to point to my old database, and then re-install SimplePortal. I didn't remove the old mods, but since most mod removals don't make any database modifications (that I'm aware of) I didn't think it would make a difference.

Yes, re-installing SimplePortal passed all tests.

I haven't had a chance to try it on a fresh database, but I can try that sometime soon.

I will attach the HTML source code when I next see the issue. I remember looking through it weeks ago trying to solve this, but unfortunately I can't remember the details.

Thanks to the whole team for the wonderful mod and for the support.

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #3 on: May 27, 2010, 01:31:22 PM »
Subs.php looks correct for the forum button.
 
Do you have caching enabled?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sean

  • Newbie
  • Posts: 4
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #4 on: May 27, 2010, 01:35:17 PM »
Yes, I do have caching enabled. I have seen it happen with both level 1 and level 2 caching although typically I have level 2 enabled and perhaps I didn't wait long enough with level 1 to see the changes permeate. I don't have a good grasp of what these levels correspond to. I also have XCache installed on the server.

I don't believe it is simply the file caching because I have tried clearing out the cache folder and the problem persisted. However, perhaps it's possible this is somehow a result of XCache?
« Last Edit: May 27, 2010, 01:43:40 PM by Sean »

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #5 on: June 02, 2010, 08:40:31 AM »
Next time the problem happens, can you capture the HTML with "view source", save it as a file, and attach it to a post?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Sean

  • Newbie
  • Posts: 4
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #6 on: June 02, 2010, 09:12:25 AM »
Thanks for the reminder. It hasn't happened since I wrote this. I can only assume it was related to the caching. That's the only reason I can think of for why it would come and go.

Either there was originally a problem with the code in my Subs.php file and that continued to be fed occasionally via the cached version or there was a slightly corrupt version lingering in the cache.
Edit - crossed out - see message below.

I have since tried clearing the cache and switching the caching level from 2 to 1 and then eventually back to 2.

If it ever happens again I will post the source code here. Thanks so much for the help.
« Last Edit: June 02, 2010, 10:10:22 AM by Sean »

Offline Nathaniel

  • Comrade
  • *
  • Posts: 5203
  • Gender: Male
    • Verbtest.com
  • SMF Version: 2 RC4
  • SP Version: 2.3.3
Re: Standalone menu broken
« Reply #7 on: June 02, 2010, 10:01:33 AM »
Interesting issue, it took me a little while to find and debug, caching is a real PITA for testing.

I'll try to explain what's happening, sorry if its a bit unclear.

Essentially, SMF makes a separate menu cache for every possible combinations of membergroups and languages (this is because the menu can change for each user, but will be the same for some users), this cache is made when a user loads the page (only for their specific set of membergroups/languages). The menu cache created for that user is then used for every user with the same membergroups/language until a certain amount of time has passed, then SMF will remake the cache.

The problem is that SimplePortal defines a $context['disable_sp'] variable, that is used to hide the 'forum' button under certain circumstances. Unfortunately, if the page load when the cache is created, is also one when the 'forum' button is meant to be hidden, the 'forum' button won't be put into the menu cache, and every single user who uses that cache will not see the 'forum' button.

There are two quick solutions:
1) Set caching to level 1, then SMF won't cache the menu at all.
2) Make the edit below (twice).

Code: ("Find (Sources/Subs.php)") [Select]
'menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language']
Code: ("Replace") [Select]
'menu_buttons-' . implode('_', $user_info['groups']) . '-' . $user_info['language'] . '-' . empty($context['disable_sp'])
Reported to the ProjectTracker:
http://simpleportal.net/index.php?issue=383.0
SMF Friend (Former Support Specialist) | SimplePortal DeveloperMy SMF Mods | SimplePortal"Quis custodiet ipsos custodes?" - Who will Guard the Guards?Please don't send me ANY support related PMs. I will just delete them.

Offline bigguy

  • Comrade
  • *
  • Posts: 62
  • Gender: Male
  • W.u.B. Owner
    • Whats Ur Beef
  • SMF Version: 2 Beta 4
  • SP Version: None
Re: Standalone menu broken
« Reply #8 on: November 24, 2010, 11:28:40 PM »
I have the same problem right now and I just installed the new version on 2.0 RC4. Sorry to open up an old topic.
Using SMF 2.1 beta 4

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #9 on: November 27, 2010, 03:12:45 PM »
I've made a note of this on the bug tracker topic.
Did you have a look at the fix above? Can it be applied to your 2.3.3 on SMF 2.0RC4 forum? Does it fix the problem?
 
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline bigguy

  • Comrade
  • *
  • Posts: 62
  • Gender: Male
  • W.u.B. Owner
    • Whats Ur Beef
  • SMF Version: 2 Beta 4
  • SP Version: None
Re: Standalone menu broken
« Reply #10 on: November 28, 2010, 11:50:34 AM »
I tried the fix and it does not work at all. To see the menu in the forum go here:

http://community.crazycanadian.net/index.php

I have just reversed these changes and still no luck
« Last Edit: November 28, 2010, 11:58:54 AM by bigguy »
Using SMF 2.1 beta 4

Offline bigguy

  • Comrade
  • *
  • Posts: 62
  • Gender: Male
  • W.u.B. Owner
    • Whats Ur Beef
  • SMF Version: 2 Beta 4
  • SP Version: None
Re: Standalone menu broken
« Reply #11 on: November 28, 2010, 02:42:47 PM »
As far as I can tell I have fixed this by replacing the following line (Subs.php):

Code: [Select]
// Figure out which action we are doing so we can set the active tab.
// Default to home.
$current_action = $modSettings['sp_portal_mode'] == 3 && empty($context['standalone']) && empty($context['disable_sp']) ? 'main' : 'home';

with this:

Code: [Select]
// Figure out which action we are doing so we can set the active tab.
// Default to home.
$current_action = 'home';
Using SMF 2.1 beta 4

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #12 on: November 29, 2010, 08:34:54 AM »
Hmmm... I've never seen that problem in standalone mode.
Then again, I've got
Code: [Select]
$current_action = $modSettings['sp_portal_mode'] == 3 && empty($context['standalone']) && empty($context['disable_sp']) ? 'forum' : 'home';[/code]
 
I don't see 'main' any where in install2.xml, and I'm not sure what 'main' would do for you.
 
 
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline bigguy

  • Comrade
  • *
  • Posts: 62
  • Gender: Male
  • W.u.B. Owner
    • Whats Ur Beef
  • SMF Version: 2 Beta 4
  • SP Version: None
Re: Standalone menu broken
« Reply #13 on: December 15, 2010, 05:45:17 PM »
main on there is what I name the front page (portal) So I have a link on my site next to home called main. Home gets renamed to forum.
Using SMF 2.1 beta 4

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: Standalone menu broken
« Reply #14 on: December 16, 2010, 10:04:30 PM »
The original poster was having a problem that was caused by caching.
If turning off caching fixed the problem, then caching could have been your problem.
 
If not, you had a different problem.
 
Did you try turning off caching?
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?