CMS MADE SIMPLE FORGE

Babel: Multilingual site

 

[#7045] Babel module completly break's page load

avatar
Created By: M@rtijn (ringportal)
Date Submitted: Fri Oct 28 07:46:06 -0400 2011

Assigned To: Pierre-Luc Germain (plger)
Version: Babel: Multilingual site 0.4
CMSMS Version: 1.10
Severity: Critical
Resolution: None
State: Open
Summary:
Babel module completly break's page load
Detailed Description:
With the new CMSMS version 1.10 Babel module kills the page load. It only shows
an unformatted menu. Looking at the html source tells me that the page stops
loading right before the module call.

Removing the entire module call from the page/template makes the website load as
normal

I'm hoping this will be an easy fix, because without Babel I can't upgrade my
website to 1.10 (I really depend on the multi language functionality)


History

Comments
avatar
Date: 2011-10-28 09:42
Posted By: Pierre-Luc Germain (plger)

Hi,
Are you using Babel 0.4 or 0.4.1 ?
What are the settings you are using? (especially, automatic redirection)
Thank you,
plger
      
avatar
Date: 2011-10-28 09:52
Posted By: M@rtijn (ringportal)

Hello Pierre!

I'm using Babel 0.4 (I don't see 0.4.1 in the Forge?)

The call in the template is simply {babel action="menu"}

The settings: 
-Auto-redirect on home page based on request (browser) language?
-Auto-redirect on all pages based on request language?
-Auto-redirect on all pages based on cookies?
-In the language menu, show link for current page (that is, current language)
too.
-Hide menu link when the according page does not exist?
-Use default language where language-specific entries haven't been supplied.

All set to 'yes' (tick), the other options to 'no' (untick)
      
avatar
Date: 2011-10-28 09:55
Posted By: Pierre-Luc Germain (plger)

Thank you for the details.
If you can, please check if it also happens with 0.4.1 (downloadable here
http://dev.cmsmadesimple.org/project/files/729 )
If the problem persists, I'll try to correct it as soon as possible.
      
avatar
Date: 2011-10-28 10:11
Posted By: M@rtijn (ringportal)

Installed the 0.4.1 version of the module, but unfortunately it didn´t solve the
problem

I also unticked the redirection options to see if that solves the issue, but to
no avail
      
avatar
Date: 2011-11-04 16:57
Posted By: Pierre-Luc Germain (plger)

I tried both upgrading and on a fresh install of cmsms 1.10, with Babel 0.4.1,
and I am unable to repeat the problem. Everything works fine here. So I'm going
to need a little bit of help.
Can you turn the debug mode on (in config.php) and see if the html source tells
you anything interesting? (you can email it to me if you wish)
When you upgraded to Babel 0.4.1, I suppose you didn't reinstall it. If you
don't have many languages, could you try uninstalling and reinstalling the
module?
      
avatar
Date: 2011-11-16 03:27
Posted By: Marius Manolea (mmanolea)

replace in babel.module.php

$other_languages = $gCms->smarty->get_template_vars('other_languages');

with

$other_languages = $gCms->GetSmarty()->get_template_vars('other_languages');

      
avatar
Date: 2011-11-27 10:28
Posted By: M@rtijn (ringportal)

@ Marius : Sorry, that doesn't change anything

@Pierre: The breaking Babel module is keeping me from updating to 1.10.2, so
I've been trying to narrow down the problem.

I reverted back to my 'old' 1.9.4.3 backup
Then I did the upgrade to 1.10 again (babel version 0.4.1). This time with debug
mode on :)

The result:
Notice: Undefined variable: newlang in --\modules\babel\babel.module.php on line
794 Fatal error: Call to a member function get_template_vars() on a non-object
in --\modules\babel\babel.module.php on line 797

It seems, that when I tick the box for `Use hierarchy for redirection?'
everything loads like it should.
Unticking the box, breaks the page right at the babel module call with above

The thing is, I want to continue using the Marco Cruz method of redirecting,
because page tree is not the same for both languages.

Does this information help you to look for a solution?
      
avatar
Date: 2011-11-28 09:18
Posted By: Pierre-Luc Germain (plger)

Yes, actually I hadn't realized that you were not using hierarchy redicrection,
now it explains why I couldn't replicate the bug here... I haven't use the other
method in ages.
Unfortunately, I will not be able to look into this in the next 1-2 weeks... but
with these information, once I have some time it should be relatively easy to
solve the problem.
      
avatar
Date: 2012-01-11 13:16
Posted By: M@rtijn (ringportal)

Pierre,

Did you find the time to look at this problem I'm having with the hierarchy
redirection method under cmsms 1.10.x?

I still can't upgrade because of this problem.

I want to install a new module, but then I have to upgrade to our latest version
cmsms, so problem with babel is holding me back from expanding my website :(
      
avatar
Date: 2012-02-06 05:00
Posted By: M@rtijn (ringportal)

Pierre?
      
avatar
Date: 2012-02-26 09:02
Posted By: Pierre-Luc Germain (plger)

On 2011-11-27 your wrote:  "I want to continue using the Marco Cruz method of
redirecting, because page tree is not the same for both languages." and on
2012-01-11: "Did you find the time to look at this problem I'm having with the
hierarchy redirection method".
Do you use the hierarchy method or not?
If not, then I'm afraid I cannot help you in any short timeframe. If yes, then
please explain your problem in more detail.
plger
      
avatar
Date: 2012-02-26 12:22
Posted By: M@rtijn (ringportal)

Excuse me for the confusion. I meant from the start I am using the Marco Cruz
method of redirection, not the menu hierarchy method.

I don't want to be a pain in the ass, but on 2011-11-27 I indeed wrote:  "I want
to continue using the Marco Cruz method of redirecting, because page tree is not
the same for both languages."

One day after (2011-11-28) you said, based on the information that I was using
the Marco Cruz method: "Unfortunately, I will not be able to look into this in
the next 1-2 weeks... but with these information, once I have some time it
should be relatively easy to solve the problem."

Thank you for responding though, now I know I don't have to expect a solution to
this problem on short term.
I will try to develop my own multi-language 'module'.
      
avatar
Date: 2012-02-26 14:36
Posted By: Pierre-Luc Germain (plger)

Could you confirm with which of the following calls the problem occurs:
{babel action="assign"}
{babel action="menu"}
{babel action="auto_redirect"}
(if it occurs with assign, it occurs with all)
Thanks,
      
avatar
Date: 2012-02-26 15:18
Posted By: Pierre-Luc Germain (plger)

I am sorry but I tried all kinds of different settings and the only problem I am
able to reproduce is the one mentioned by Marius, and as he said it can be
solved by changing $gCms->smarty to $gCms->getSmarty()
Please if anybody else is having the same problem as M@rtijn, let us know.