Forums / Developer / Problem switching languages using ezwebin extension

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!

eZ debug

Timing: Jan 19 2025 06:27:30
Script start
Timing: Jan 19 2025 06:27:30
Module start 'content'
Timing: Jan 19 2025 06:27:30
Module end 'content'
Timing: Jan 19 2025 06:27:30
Script end

Main resources:

Total runtime0.1548 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 589.1016180.8125
Module start 'content' 0.00660.0049 769.914194.0547
Module end 'content' 0.01150.1432 863.9688523.8750
Script end 0.1547  1,387.8438 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.1841200.0002
Check MTime0.00130.8520200.0001
Mysql Total
Database connection0.00100.627310.0010
Mysqli_queries0.109870.93791410.0008
Looping result0.00130.80971390.0000
Template Total0.142992.310.1429
Template load0.00090.574510.0009
Template processing0.142091.750110.1420
Override
Cache load0.00060.385210.0006
Sytem overhead
Fetch class attribute can translate value0.00110.733310.0011
XML
Image XML parsing0.00030.179010.0003
General
dbfile0.00473.0506200.0002
String conversion0.00000.003130.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs