browserlanguage error cropping up

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

browserlanguage error cropping up

Ric Lewis-3
We've recently been seeing the error below for the first time. Investigating it, I realized that Knop will switch to a different language based on the browser's accept-language header. Which is all fine and dandy, but we're currently testing German and Japanese, so have the language options hidden for the time being. However German and Japanese clients will have had their language switched automatically.

Easy to override by setting $s_lang explicitly, so it's not a problem, but useful to know about. And the automatic browserlanguage option was not working consistently, some (jquery) ajax calls would switch back to the default 'en', bizarrely when sending two URL parameters, but would stay in the correct language sending only one. I have no idea why that is.

Anyway, not sure what this error means yet, or whether it is coming from the framework or our code. Perhaps something to do with caching the nav object.

On 1 Mar 2012, at 07:34, [hidden email] wrote:

No tag, type or constant was defined under the name null->split with arguments: array: (
)
at: browserlanguage
at: getstring with params: -key='home', -language=@'', -replace=@''
at: home
at: /_config/cfg__nav.inc on line: 132 at position: 22
at: include with params: '/_config/cfg__nav.inc'

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: browserlanguage error cropping up

stevepiercy
Can you provide a code sample that triggers the error message?

The precedence for language setting is the following:

     When the language of a knop_lang object is set, that
language is used for
     all subsequent requests for strings until another language
is set. The
     selected language is shared between all knop_lang objects
on the same
     page for that visitor, unless another language has been set specifically
     for an individual knop_lang object.

     If no specific language is set on the page, knop_lang uses
the browser's
     most preferred language if it's available in the knop_lang object,
     otherwise it defaults to the first language (unless a
default language has
     been set for the knop_lang object).

So providing additional code samples and wherever you set the
language may be helpful to troubleshoot.

--steve


On 3/1/12 at 11:09 AM, [hidden email] (Ric Lewis) pronounced:

>We've recently been seeing the error below for the first time.
>Investigating it, I realized that Knop will switch to a
>different language based on the browser's accept-language
>header. Which is all fine and dandy, but we're currently
>testing German and Japanese, so have the language options
>hidden for the time being. However German and Japanese clients
>will have had their language switched automatically.
>
>Easy to override by setting $s_lang explicitly, so it's not a
>problem, but useful to know about. And the automatic
>browserlanguage option was not working consistently, some
>(jquery) ajax calls would switch back to the default 'en',
>bizarrely when sending two URL parameters, but would stay in
>the correct language sending only one. I have no idea why that is.
>
>Anyway, not sure what this error means yet, or whether it is
>coming from the framework or our code. Perhaps something to do
>with caching the nav object.
>
>On 1 Mar 2012, at 07:34, [hidden email] wrote:
>
>>No tag, type or constant was defined under the name null->split with arguments:
>array: (
>>)
>>at: browserlanguage
>>at: getstring with params: -key='home', -language=@'', -replace=@''
>>at: home
>>at: /_config/cfg__nav.inc on line: 132 at position: 22
>>at: include with params: '/_config/cfg__nav.inc'
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: browserlanguage error cropping up

Ric Lewis-3
Yes, it's just the first incidence of accessing the lang_ui object in cfg__nav, so something is not right with the lang object definition at that point, and of course nav stops loading. Users do seem to be able to continue with their session, so may not perceive any error.

$nav -> (insert:
                -key='home',
                -label=$lang_ui -> home,
                -url='home');

we do set 'en' as the default explicitly in cfg__lang, but it's also the first language defined:

var: 'lang_ui'=(knop_lang: -default='en', -fallback);

I don't think the browserlanguage error message and the language inconsistency we're seeing with ajax calls are related, we just came across the latter whilst investigating the error. And we've yet to try changing the way we pass the URL parameters in jquery to see if that fixes the switching problem.

I upped the caching time recently on all objects so that may be related in some way.

On 1 Mar 2012, at 11:36, Steve Piercy - Web Site Builder wrote:

> Can you provide a code sample that triggers the error message?
>
> The precedence for language setting is the following:
>
>    When the language of a knop_lang object is set, that language is used for
>    all subsequent requests for strings until another language is set. The
>    selected language is shared between all knop_lang objects on the same
>    page for that visitor, unless another language has been set specifically
>    for an individual knop_lang object.
>
>    If no specific language is set on the page, knop_lang uses the browser's
>    most preferred language if it's available in the knop_lang object,
>    otherwise it defaults to the first language (unless a default language has
>    been set for the knop_lang object).
>
> So providing additional code samples and wherever you set the language may be helpful to troubleshoot.
>
> --steve
>
>
> On 3/1/12 at 11:09 AM, [hidden email] (Ric Lewis) pronounced:
>
>> We've recently been seeing the error below for the first time. Investigating it, I realized that Knop will switch to a different language based on the browser's accept-language header. Which is all fine and dandy, but we're currently testing German and Japanese, so have the language options hidden for the time being. However German and Japanese clients will have had their language switched automatically.
>>
>> Easy to override by setting $s_lang explicitly, so it's not a problem, but useful to know about. And the automatic browserlanguage option was not working consistently, some (jquery) ajax calls would switch back to the default 'en', bizarrely when sending two URL parameters, but would stay in the correct language sending only one. I have no idea why that is.
>>
>> Anyway, not sure what this error means yet, or whether it is coming from the framework or our code. Perhaps something to do with caching the nav object.
>>
>> On 1 Mar 2012, at 07:34, [hidden email] wrote:
>>
>>> No tag, type or constant was defined under the name null->split with arguments:
>> array: (
>>> )
>>> at: browserlanguage
>>> at: getstring with params: -key='home', -language=@'', -replace=@''
>>> at: home
>>> at: /_config/cfg__nav.inc on line: 132 at position: 22
>>> at: include with params: '/_config/cfg__nav.inc'
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> --
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
> List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
> Project homepage http://montania.se/projects/knop/
> Google Code has the latest downloads at http://code.google.com/p/knop/


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: browserlanguage error cropping up

stevepiercy
Are you using sessions?

If so, what do you store in them?

You could turn off caches to see if the issue persists.

--steve


On 3/1/12 at 12:28 PM, [hidden email] (Ric Lewis) pronounced:

> Yes, it's just the first incidence of accessing the lang_ui object in cfg__nav, so
> something is not right with the lang object definition at that point, and of course
> nav stops loading. Users do seem to be able to continue with their session, so may not
> perceive any error.
>
> $nav -> (insert:
>       -key='home',
>       -label=$lang_ui -> home,
>       -url='home');
>
> we do set 'en' as the default explicitly in cfg__lang, but it's also the first
> language defined:
>
> var: 'lang_ui'=(knop_lang: -default='en', -fallback);
>
> I don't think the browserlanguage error message and the language inconsistency we're
> seeing with ajax calls are related, we just came across the latter whilst
> investigating the error. And we've yet to try changing the way we pass the URL
> parameters in jquery to see if that fixes the switching problem.
>
> I upped the caching time recently on all objects so that may be related in some way.
>
> On 1 Mar 2012, at 11:36, Steve Piercy - Web Site Builder wrote:
>
> > Can you provide a code sample that triggers the error message?
> >
> > The precedence for language setting is the following:
> >
> >    When the language of a knop_lang object is set, that language is used for
> >    all subsequent requests for strings until another language is set. The
> >    selected language is shared between all knop_lang objects on the same
> >    page for that visitor, unless another language has been set specifically
> >    for an individual knop_lang object.
> >
> >    If no specific language is set on the page, knop_lang uses the browser's
> >    most preferred language if it's available in the knop_lang object,
> >    otherwise it defaults to the first language (unless a default language has
> >    been set for the knop_lang object).
> >
> > So providing additional code samples and wherever you set the language may be
> helpful to troubleshoot.
> >
> > --steve
> >
> >
> > On 3/1/12 at 11:09 AM, [hidden email] (Ric Lewis) pronounced:
> >
> >> We've recently been seeing the error below for the first time. Investigating it, I
> realized that Knop will switch to a different language based on the browser's
> accept-language header. Which is all fine and dandy, but we're currently testing
> German and Japanese, so have the language options hidden for the time being. However
> German and Japanese clients will have had their language switched automatically.
> >>
> >> Easy to override by setting $s_lang explicitly, so it's not a problem, but useful
> to know about. And the automatic browserlanguage option was not working consistently,
> some (jquery) ajax calls would switch back to the default 'en', bizarrely when sending
> two URL parameters, but would stay in the correct language sending only one. I have no
> idea why that is.
> >>
> >> Anyway, not sure what this error means yet, or whether it is coming from the
> framework or our code. Perhaps something to do with caching the nav object.
> >>
> >> On 1 Mar 2012, at 07:34, [hidden email] wrote:
> >>
> >>> No tag, type or constant was defined under the name null->split with arguments:
> >> array: (
> >>> )
> >>> at: browserlanguage
> >>> at: getstring with params: -key='home', -language=@'', -replace=@''
> >>> at: home
> >>> at: /_config/cfg__nav.inc on line: 132 at position: 22
> >>> at: include with params: '/_config/cfg__nav.inc'
> >>
> >>
> >
> > -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> > Steve Piercy               Web Site Builder               Soquel, CA
> > <[hidden email]>                  <http://www.StevePiercy.com/>
> >
> >
> > --
> > #############################################################
> > This message is sent to you because you are subscribed to
> > the mailing list <[hidden email]>.
> > To unsubscribe, E-mail to: <[hidden email]>
> > Send administrative queries to  <[hidden email]>
> > List archive
> http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
> > Project homepage http://montania.se/projects/knop/
> > Google Code has the latest downloads at http://code.google.com/p/knop/
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: browserlanguage error cropping up

Ric Lewis-3
We are using sessions, and we're storing the user's nav object in there, so that could certainly be something to do with it. It may be the cache expiry of the nav object being out of sync with the session expiry time causing problems, so we'll change that back and watch for the error again. It only appears about once a week, so it's a little hard to track down. That sounds plausible though, thanks!

On 1 Mar 2012, at 13:24, Steve Piercy - Web Site Builder wrote:

> Are you using sessions?
>
> If so, what do you store in them?
>
> You could turn off caches to see if the issue persists.
>
> --steve
>
>
> On 3/1/12 at 12:28 PM, [hidden email] (Ric Lewis) pronounced:
>
>> Yes, it's just the first incidence of accessing the lang_ui object in cfg__nav, so
>> something is not right with the lang object definition at that point, and of course
>> nav stops loading. Users do seem to be able to continue with their session, so may not
>> perceive any error.
>>
>> $nav -> (insert:
>>      -key='home',
>>      -label=$lang_ui -> home,
>>      -url='home');
>>
>> we do set 'en' as the default explicitly in cfg__lang, but it's also the first
>> language defined:
>>
>> var: 'lang_ui'=(knop_lang: -default='en', -fallback);
>>
>> I don't think the browserlanguage error message and the language inconsistency we're
>> seeing with ajax calls are related, we just came across the latter whilst
>> investigating the error. And we've yet to try changing the way we pass the URL
>> parameters in jquery to see if that fixes the switching problem.
>>
>> I upped the caching time recently on all objects so that may be related in some way.
>>
>> On 1 Mar 2012, at 11:36, Steve Piercy - Web Site Builder wrote:
>>
>>> Can you provide a code sample that triggers the error message?
>>>
>>> The precedence for language setting is the following:
>>>
>>>   When the language of a knop_lang object is set, that language is used for
>>>   all subsequent requests for strings until another language is set. The
>>>   selected language is shared between all knop_lang objects on the same
>>>   page for that visitor, unless another language has been set specifically
>>>   for an individual knop_lang object.
>>>
>>>   If no specific language is set on the page, knop_lang uses the browser's
>>>   most preferred language if it's available in the knop_lang object,
>>>   otherwise it defaults to the first language (unless a default language has
>>>   been set for the knop_lang object).
>>>
>>> So providing additional code samples and wherever you set the language may be
>> helpful to troubleshoot.
>>>
>>> --steve
>>>
>>>
>>> On 3/1/12 at 11:09 AM, [hidden email] (Ric Lewis) pronounced:
>>>
>>>> We've recently been seeing the error below for the first time. Investigating it, I
>> realized that Knop will switch to a different language based on the browser's
>> accept-language header. Which is all fine and dandy, but we're currently testing
>> German and Japanese, so have the language options hidden for the time being. However
>> German and Japanese clients will have had their language switched automatically.
>>>>
>>>> Easy to override by setting $s_lang explicitly, so it's not a problem, but useful
>> to know about. And the automatic browserlanguage option was not working consistently,
>> some (jquery) ajax calls would switch back to the default 'en', bizarrely when sending
>> two URL parameters, but would stay in the correct language sending only one. I have no
>> idea why that is.
>>>>
>>>> Anyway, not sure what this error means yet, or whether it is coming from the
>> framework or our code. Perhaps something to do with caching the nav object.
>>>>
>>>> On 1 Mar 2012, at 07:34, [hidden email] wrote:
>>>>
>>>>> No tag, type or constant was defined under the name null->split with arguments:
>>>> array: (
>>>>> )
>>>>> at: browserlanguage
>>>>> at: getstring with params: -key='home', -language=@'', -replace=@''
>>>>> at: home
>>>>> at: /_config/cfg__nav.inc on line: 132 at position: 22
>>>>> at: include with params: '/_config/cfg__nav.inc'
>>>>
>>>>
>>>
>>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> Steve Piercy               Web Site Builder               Soquel, CA
>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>
>>> --
>>> #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list <[hidden email]>.
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>> List archive
>> http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>> Project homepage http://montania.se/projects/knop/
>>> Google Code has the latest downloads at http://code.google.com/p/knop/
>>
>>
>
> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> Steve Piercy               Web Site Builder               Soquel, CA
> <[hidden email]>                  <http://www.StevePiercy.com/>
>
>
> --
> #############################################################
> This message is sent to you because you are subscribed to
> the mailing list <[hidden email]>.
> To unsubscribe, E-mail to: <[hidden email]>
> Send administrative queries to  <[hidden email]>
> List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
> Project homepage http://montania.se/projects/knop/
> Google Code has the latest downloads at http://code.google.com/p/knop/


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Loading...