Problem switching languages using ezwebin extension

Author Message

Salvatore Guarino

Thursday 07 February 2008 2:43:21 am

I have a problem switching languages on my 4 languages site. I used the ezwebin extension, that has the following code to generate languages links:

<ul>
        {foreach $pagedesign.data_map.language_settings.content.rows.sequential as $row}
        {def $site_url = $row.columns[0]
             $language = $row.columns[2]}
        {if $row.columns[0]}
            {set $site_url = $site_url|append( "/" )}
            <li{if $row.columns[1]|downcase()|eq($access_type.name)} class="current_siteaccess"{/if}>
            {if is_set($DesignKeys:used.url_alias)}
                <a href="{concat( "http://", $site_url,
                         $DesignKeys:used.url_alias
                         )}">{$language}</a>
            {else}
                <a href="{concat( "http://", $site_url,
                         $uri_string
                         )}">{$language}</a>
            {/if}
            </li>
        {/if}
        {undef $site_url $language}
        {/foreach}
        </ul>

My primary language is the italian. The problem is this:

I access to the site at the address www.my-site.com/ita/prodotti (it works),
then I click on the "eng" link that point to this address: www.my-site.com/eng/prodotti (it works), but now if I click again on ita it doesn't point to www.my-site.com/ita/prodotti but to www.my-site.com/ita/products (in english) and this link doesn't works. The same problem is present switching between all other languages, the first time it works, but the second time the variable $uri_string is wrong, it doesn't contain the string in the destination language but in the string in the current language. I think that is a bug in the ezwebin...

Thx in advance for your help!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 04:19:35
Script start
Timing: Jan 19 2025 04:19:35
Module start 'layout'
Timing: Jan 19 2025 04:19:35
Module start 'content'
Timing: Jan 19 2025 04:19:36
Module end 'content'
Timing: Jan 19 2025 04:19:36
Script end

Main resources:

Total runtime0.7468 sec
Peak memory usage4,096.0000 KB
Database Queries46

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.3047152.6406
Module start 'layout' 0.00540.0030 741.945339.4766
Module start 'content' 0.00840.7367 781.4219445.2422
Module end 'content' 0.74510.0016 1,226.66418.2813
Script end 0.7468  1,234.9453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00360.4789160.0002
Check MTime0.00160.2165160.0001
Mysql Total
Database connection0.00100.136810.0010
Mysqli_queries0.707594.7389460.0154
Looping result0.00040.0558440.0000
Template Total0.713195.520.3566
Template load0.00240.318020.0012
Template processing0.710795.165520.3554
Template load and register function0.00010.013110.0001
states
state_id_array0.00150.195510.0015
state_identifier_array0.00290.387120.0014
Override
Cache load0.00180.2469100.0002
Sytem overhead
Fetch class attribute can translate value0.00050.061710.0005
Fetch class attribute name0.00070.098020.0004
XML
Image XML parsing0.00140.182910.0014
class_abstraction
Instantiating content class attribute0.00000.000420.0000
General
dbfile0.00250.3372170.0001
String conversion0.00000.001040.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 9
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs