[SOLVED!] The 2 Bottom Bars Issue

Post

Posted
Rating:
#2588 (In Topic #512)

twice the bug, twice the fun?

Greetings,

So I have this weird issue where on certain pages the bottom bar is repeated. See screenshot.

Screenshot from 2017-04-24 10-01-55.png

On the actual forum/home page this doesn't happen. However I've noticed this when making a post, within a post/thread, in the chat lobby, and in a chat room thus far. I am curious, what is causing this and how do I fix it? It looks a bit silly to have it there twice. 

Last edit: by mythus


Post

Posted
Rating:
#2589
Is the site upgraded from an earlier version?

Post

Posted
Rating:
#2590
Nope, built it up from scratch this time. Kudos btw - the SMF importer worked flawlessly and it only took me a weekend to get it all up and running.

Anyway, I did add the bottom bar to the main zone and use redirects to make the forum be the home page. Perhaps that is causing it?

Post

Posted
Rating:
#2591
I've checked and on both v9 and v10 the block is put in via the panel_bottom in the same way, only in one place. However, perhaps that page has been edited to be more complex with multiple instantiations of the block, or maybe it's being added in via some other means?

So please share if you've added the block anywhere else, and if that page has been edited away from the default.

I've just read your reply while writing this:
Anyway, I did add the bottom bar to the main zone and use redirects to make the forum be the home page. Perhaps that is causing it?

That's probably it, but we'd need to know exactly what your pages and redirects are. Every redirect and the code of every page with the block on.

Post

Posted
Rating:
#2592
Sure thing.

Redirects are:

Code

Welcome:start -> Forums:forumview to make forums be the default home page.
Forums:forumview -> Welcome:start to make forums be the default home page.

Those are the only redirects I've added.

As far as with the bottom bar, I've added it here: comcode page panel_bottom
This is the code for said page:

Code

[semihtml][block param="1,9,10,11,12,13,14,15,16,17,18,25,19,20,21,22" limit="4" hot="0" date_key="lasttime" username_key="lastusername" title="Recent Posts" check="0" defer="1"]main_forum_topics[/block][block param="1" max="8"]side_shoutbox[/block]<br />
[block]main_bottom_bar[/block]<br />
{$SET,SHOW_BOTTOM_BAR,{$AND,{$ADDON_INSTALLED,cns_forum},{$CNS},{$ADDON_INSTALLED,redirects_editor},{$OR,{$EQ,{$PAGE},chat,users_online,points,pointstore,warnings,contact_member,groups,rules,members,leader_board},{$EQ,{$ZONE},forum}}}} {+START,IF,{$GET,SHOW_BOTTOM_BAR}}{$,We load this using Tempcode so we can mark it for late-loading, for performance &#111;n pages that do not actually use it; the CSS includes are so that CSS does still always get correctly pre-processed} {$REQUIRE_CSS,{$?,{$GET,SHOW_BOTTOM_BAR},cns}} {$REQUIRE_CSS,{$?,{$GET,SHOW_BOTTOM_BAR},cns_footer}} {$BLOCK-,block=main_bottom_bar} {+END}[/semihtml]

It looks like that the forumview zone is calling a different panel_bottom page, but I've added no code to it. This is the code for the panel_bottom page forumview zone is calling:

Code

[semihtml][title]Panel Bottom[/title]
[block]main_comcode_page_children[/block][/semihtml]

And that's it really. I've added a call to a comcode page for the main forum index to show a bit of news. Need to see that? Its in CNS_FORUM.tpl so I doubt it's related to this. The rest of my work has largely been CSS for theme work, oh and that little bit with the logo.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5
#2593
Oh I should add, the first redirect is transparent while the second is not.

Post

Posted
Rating:
Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 Item has a rating of 5 (Liked by mythus)
#2594
Ok, the first panel_bottom page you posted, you can see it's included twice in there if you look carefully. I think one is the one you added (comes first), then deeper in is the default one.
The default code is showing the bottom bar based on a contextualisation. Various different pages. It's kind of side-stepping the normal zone/panel structure because we're showing it on what we consider 'social pages'.

Post

Posted
Rating:
#2595
Yup, you are so right. I didn't even think to look in that bit of code. Silly mistake on my part…

I removed the second one within the tempcode since all of my site is basically social. After all, I'm not using the default home/welcome page since I have the forums as the main page. Now the evil twin of the bottom bar is gone, and I am getting only 1 bottom bar per page as desired.

Thanks Chris!

5 guests and 0 members have recently viewed this.