Author Topic: Multilanguage site: submenu dissapears after search #SOLVED#  (Read 19412 times)

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Multilanguage site: submenu dissapears after search #SOLVED#
« on: April 03, 2008, 02:08:58 PM »
Hi,

At this moment I'm working on the allcss2 template with multilanguage. All things are fine.

But when I do a search the whole menu dissapears.

I checked the forum and discovered that this is a known issue. On this page there seems to be a solution: http://projects.WebsiteBaker.org/websitebaker2/ticket/327

After reading this ticket I do not know what to do. I see 2 files, but do I have to replace them??

Besides that the same thing happens when using a multiple menu and after login via the front-end.

Any help would be appriciated. ThnQ.

Knert
« Last Edit: July 16, 2008, 07:20:16 PM by knert »
...:: Bake the Unbakable ::...

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
Re: Multilanguage website: menu dissapears after search and multimenu
« Reply #1 on: April 04, 2008, 12:59:07 AM »
A DIFF File is a file containing ONLY the changes, so replacing will not help. Use a Tool like WinDiff to merge the diff file into the original files.

cheers

Klaus

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage website: menu dissapears after search and multimenu
« Reply #2 on: April 04, 2008, 01:49:13 PM »
Thank you Klaus. I did not know that.

Unfortunately the solution does not work for me.

I have WB 2.6.7
Template: ALLCSS2
mod: Multilanguage

The menu still disapears when doing a search on a multilanguage template with show_menu2.

Any help would be highly appreciated. This is a huge project with a deadline.
...:: Bake the Unbakable ::...

Offline kweitzel

  • WebsiteBaker Org e.V.
  • **
  • Posts: 6983
  • Gender: Male
Re: Multilanguage website: menu dissapears after search and multimenu
« Reply #3 on: April 04, 2008, 04:46:34 PM »
Then please test WB 2.7 (RC2) if it works fine, as far as I know, this is included.

cheers

Klaus

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage website: menu dissapears after search and multimenu
« Reply #4 on: April 06, 2008, 06:11:35 PM »
Thank you Klaus,

Unfortenately the upgrade does not solve the problem either.

The only thing left I can do now is a fresh install but that means LOTS of extra work. And even then I still don't know if it will work well :(
...:: Bake the Unbakable ::...

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage website: menu dissapears after search and multimenu
« Reply #5 on: April 07, 2008, 02:06:04 PM »
Unfortenately WB 2.7 does the same thing...the menu dissapears.

What I did:

- downloaded WB 2.7
- a clean install
- installed ALLCSS2 template
- installed show_menu2
- made it multilanguage by following the steps as mentioned in the link below.
http://help.WebsiteBaker.org/pages/en/advanced-docu/designer-guide/multilingual-websites.php

What happens:

After a search the menu dissapears.

After some testing It seems like it's the known root problem again. Because of the multilanguage there must be some editing in the show_menu2 parameters to hide the root. Because of the root hiding the menu dissapears after doing a search. I recently checked a website http://www.trekwerk.com that does handle this issue.

So I think I do something wrong in the paramaters of the show_menu2

flags:
Code: [Select]
<?php show_menu2(0SM2_ROOTSM2_STARTtrue" [a]<img src=" .WB_URL .  "/media/flags/[menu_title].gif border=0 />[/a] ", &#39;&#39;, &#39;&#39;, &#39;&#39;, false, &#39;&#39;, 0); ?>
menu:
Code: [Select]
<?php show_menu2(0SM2_ROOT+1SM2_ALLSM2_ALL|SM2_CURRTREEfalse"\n</li>"falsefalsefalse, &#39;<ul id="header_menu" class="menu">&#39;); ?>
« Last Edit: April 07, 2008, 02:33:20 PM by knert »
...:: Bake the Unbakable ::...

Offline ruebenwurzel

  • Betatester
  • **
  • Posts: 8413
  • Gender: Male
  • Keep on Rockin
    • Familie Gallas Online
Re: Multilanguage website: menu dissapears after search and multimenu
« Reply #6 on: April 07, 2008, 02:11:19 PM »
Hello,

Have you tried the latest version of show_menu2? On Addons page there is version 4.41 available.

Matthias
« Last Edit: April 07, 2008, 02:15:36 PM by ruebenwurzel »

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage website: menu dissapears after search and multimenu
« Reply #7 on: April 07, 2008, 02:32:36 PM »
Yes Matthias,

I downloaded it and it gave me the same result, the menu dissapears.

I would like to learn from the mistake I make why it's not working for me.

I think I'm pretty sure that I did something wrong with the show_menu2 param's in my previous message.

#Update#

After some backyard screaming and strong coffee I checked the code again and deleted SM2_ROOT in the show_menu2.

Now it works like a charm!

Thank you for your time and answers.
« Last Edit: April 07, 2008, 02:59:16 PM by knert »
...:: Bake the Unbakable ::...

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
How cruel can this world be  :cry:

Just of a sudden...my multilanguage website where I was working on does not work correctly any more.

I struggled for 3 full weeks to run a multilangual website. And now, after 3 weeks, spending more than 150 hours I'm back to where the problem began.

The problem that I'm running into constantly is the simple fact that when I do a search the submenu dissapears.

I did everything you can think of. Did a fresh install with WB 2.7, read the help page for multilanguage website thousands of times, entered just every show_menu2 combination that I could think of, checked the help in the forum, checked numberous templates and more....but still no luck.

Now, it's clear for me that i'm not able to solve this issue any more by myself. Can anyone please finish my suffering and spend some time to help me with this neverending story? When needed url + login is available in pm.

I think the problem is in the show_menu2:

Code: [Select]
<?php show_menu2(0SM2_ROOT+1SM2_ALLSM2_ALL|SM2_CURRTREEfalse"\n</li>"falsefalsefalse, &#39;<ul id="header_menu" class="menu">&#39;); ?>
PLease help. Thank you.  :oops:
« Last Edit: April 09, 2008, 11:26:26 AM by knert »
...:: Bake the Unbakable ::...

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #9 on: April 10, 2008, 01:39:48 PM »
A few days further, still no luck. I ran out of options.

Still the same problem: On a multilanguage website when doing a search the submenu dissapears.

I checked the doc http://code.jellycan.com/files/show_menu2-README.txt from the show_menu2 and came out with a code that seems to me the most logic one:

Code: [Select]
<?php show_menu2(0SM2_ROOT+1SM2_CURRSM2_ALL|SM2_CURRTREEfalse); ?>
(sm2_root+1 = starting 1 level beneath the root | sm2_curr = starts with the current page level | sm2_all = all levels are displayed | sm2_currtree = leave out the other menus from the other languages)

My question to ANYONE who can give me the solution or has made a successfull multilanguage website with a good working search function: can you please share the show_menu2 code or help me get rid of the things I do wrong?

I'm working on this for a few weeks now and I would like to go further with the build of the website and the deadline of it.

Thank you

Sincerly
Knert

...:: Bake the Unbakable ::...

doc

  • Guest
Re: Multilanguage site: submenu dissapears after search
« Reply #10 on: April 10, 2008, 08:10:50 PM »
Hello,

you may want to try remarking line 30 in /search/index.php (only WB 2.7 or WB 2.6.x with error reporting disabled).
Code: [Select]
//$page_id = 0;
Some WB features or modules may not work as expected so you need to test your configuration. However for one client, this did the trick (using WB show_menu). Otherwise you need to touch some more WB core files which is not recommended.

Regards Christian
« Last Edit: April 10, 2008, 11:34:57 PM by doc »

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #11 on: April 10, 2008, 10:03:14 PM »
Hello Christian,

Thank you for your help.

I tried it but...no luck either. I did a fresh install, no extra modules installed (except sm2) and only changed the sm2 codes for the flags (for multilangual) and menu in the index.

I do not understand how this is possible. I tried it with lots of other templates too...same thing.

 :cry:

...:: Bake the Unbakable ::...

Offline kct-networx

  • Posts: 20
Re: Multilanguage site: submenu dissapears after search
« Reply #12 on: April 12, 2008, 11:45:50 AM »
Hi KNERT,

what Christian wrote is the solution for show_menu, not for show_menu2!
Remarking the $page_id = 0 in /search/index.php solved the problem in my case (show_menu).

Regards,
Markus

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #13 on: April 13, 2008, 12:01:38 AM »
Hello Markus,

Thanks for notifying.

My problem is still there. Help would be highly appreciated.
...:: Bake the Unbakable ::...

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #14 on: April 14, 2008, 08:59:17 PM »
Hi,
Someone on this forum came up with a possibillity that may be my server (which is a professional hosting company) is not configured well in order to let the multilanguage website run well. How small this chance would be, I'd considered it so I asked a friend who owns a internet designcompany If I could use a piece of his server to test the multilanguage website.

Unfortenately it ended with the same troubles that I'm facing for over weeks and weeks now.

Is there someone, who runs a multilanguage website, willing to share his WB template so I can test it on my server? Or at least, wants to share the show_menu2 codes that generates the flags and menu?

Thank you in advance
Knert

...:: Bake the Unbakable ::...

doc

  • Guest
Re: Multilanguage site: submenu dissapears after search
« Reply #15 on: April 14, 2008, 09:26:42 PM »
Hello,

this is what we are using on the multilingual WB Help project site for the left navigation menu:
Code: [Select]
<?php 
show_menu2
(0SM2_ROOT+1SM2_START+1SM2_TRIM|SM2_PRETTY, &#39;<li><a &#39; ."[if(class=menu-current){class=\"menu_current\" }]" .&#39;href="[url]" target="[target]">[menu_title]</a>&#39;, "</li>", "<ul>","</ul>", false, &#39;<ul>&#39;); 
?>

Regards Christian

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #16 on: April 15, 2008, 08:26:54 PM »
Thank you Christian,

But what I see now in the HELP section is exact the same thing as my problem: choose a language, watch the menu on the left, do a search and the menu dissapears. And that's my issue all this time. I would like the menu to stay intact when I do a search.

Sincerley
Knert.
« Last Edit: April 15, 2008, 08:40:16 PM by knert »
...:: Bake the Unbakable ::...

doc

  • Guest
Re: Multilanguage site: submenu dissapears after search
« Reply #17 on: April 15, 2008, 08:53:11 PM »
Hello,

uups you are right, forgot that we have switched to show_menu2.

You can write a feature request in the Code Snippets thread (search for show_menu2) or you could send a PM to brofield, the author of show_menu2 and ask if he can provide a fix for the page_id == 0 problem coming along with the WB search feature.

Regards Christian

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #18 on: April 15, 2008, 09:39:59 PM »
So after all it was not my fault  :roll:

I sent Brofield a PM. I hope he is able to fix this issue.

When there's a fix I'll let it know.

Sincerley
Knert
...:: Bake the Unbakable ::...

brofield

  • Guest
Re: Multilanguage site: submenu dissapears after search
« Reply #19 on: April 18, 2008, 04:52:56 AM »
Have you added the referrer field to the search settings page as stated here:
http://projects.WebsiteBaker.org/websitebaker2/ticket/327

1. Settings
2. Show advanced settings
3. Find the Search Settings -> Header
4. add this input field immediately following the <form> open tag
<input type="hidden" name="referrer" value="[REFERRER_ID]" />

It all works for me at sm2test. See a sample search here...
http://code.jellycan.com/sm2test/search/index.php?string=foo&submit=Search&referrer=5

There may be more to it depending on the multilanguage stuff you are doing.

Brodie

brofield

  • Guest
Re: Multilanguage site: submenu dissapears after search
« Reply #20 on: April 18, 2008, 05:20:16 AM »
After doing this, try updating to this version of the sm2 include file. The changes in this revision are a test only and it may not be the real version. Basically, this uses the referrer page ID as the current page ID when we don't have a current page (i.e. after a search, the menu still considers you to be on the same page as when you started the search). Not sure if this is what is really desired though.

http://showmenu2.googlecode.com/svn-history/r11/trunk/include.php

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #21 on: April 18, 2008, 10:09:55 AM »
Thank you Brofield for taking the time to check it out. Unfortenately the answer is: not working.

What I did:

- fresh install wb2.7
- enabled page languages in adv. settings
- enabled intro page in adv. settings
- installed SM2 4.5 mod
- installed ALLCSS2
- created the language structure
- ONLY changed 2 lines of code within the index.php of the ALLCSS2 template:

flags:
Code: [Select]
<?php show_menu2(0SM2_ROOTSM2_STARTfalse" [a]<img src=" .WB_URL .  "/media/flags/[menu_title].gif border=0 />[/a] ", &#39;&#39;, &#39;&#39;, &#39;&#39;, false, &#39;&#39;, 0); ?>
menu:
Code: [Select]
<?php 
show_menu2
(0SM2_ROOT+1SM2_START+1SM2_TRIM|SM2_PRETTY, &#39;<li><a &#39; ."[if(class=menu-current){class=\"menu_current\" }]" .&#39;href="[url]" target="[target]">[menu_title]</a>&#39;, "</li>", "<ul>","</ul>", false, &#39;<ul>&#39;); 
?>

- implemented the : <input type="hidden" name="referrer" value="[REFERRER_ID]" />
- changed the include.php

Result: [link removed]

Sincerely,
Knert
« Last Edit: March 21, 2010, 02:31:15 PM by Boudi »
...:: Bake the Unbakable ::...

brofield

  • Guest
Re: Multilanguage site: submenu dissapears after search
« Reply #22 on: April 18, 2008, 10:11:38 AM »
So what is it supposed to be showing?
I see nothing but as far as I know, that is what I am supposed to see.

Offline Boudi

  • Posts: 1190
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Multilanguage site: submenu dissapears after search
« Reply #23 on: April 18, 2008, 10:12:34 AM »
When you do a search, the menu is dissapearing.  :|

When you want I can pm you the logindata?
« Last Edit: April 18, 2008, 10:14:54 AM by knert »
...:: Bake the Unbakable ::...

Offline Luckyluke

  • Posts: 556
  • Gender: Male
  • Let's Rock
Re: Multilanguage site: submenu dissapears after search
« Reply #24 on: April 18, 2008, 12:01:02 PM »
Hi,

I have something in common. And that in 2 cases. My site also contains 2 languages: (NL and EN).

Example how something can obtain:

1: visit www.kisstory.be
2: Select a language, English for example
3: Select guestbook
4: Select sign guestbook
5: well, here you see the menu change. Suddenly, EN or NL (Dutch) as a main menu  :?

For this test I enabled the search capabilities (I will turn it off in some days). If you are looking for something and press search then the menu disappears, only the main menu is visible. A similar case as Knert.

I have no solution for this. The search is normally turned off on my site. And I can live with the problem of the guest book, But it is not a pretty sight.
And for the record: my template doesn't use MENU2 !!!

Grtz,
Luc