Hi,
I'm using YAMS on localhost (using xampplite) and with MODx 1.0.14.
The page has two Wayfinder menus and one call to Ditto.
The menus stay in the main language, and are not correctly styled on the translated pages. The call to Ditto is not executed, on the translated pages: it is printed.
I observed that the path to MODx documents is wrong for the translated pages, so I suspect some .htaccess or configuration issue.
Configuration
The .htaccess file is:
php_flag register_globals Off
#AddDefaultCharset utf-8
#php_value date.timezone Europe/Moscow
Options +FollowSymlinks
# Friendly URLs
RewriteEngine On
RewriteBase /somesite.ext/
# Fix Apache internal dummy connections from breaking [(site_url)] cache
RewriteCond %{HTTP_USER_AGENT} ^.*internal\ dummy\ connection.*$ [NC]
RewriteRule .* - [F,L]
# Exclude /assets and /manager directories from rewrite rules
RewriteRule ^(manager|assets) - [L]
# Redirect from mydomain.com/rootname to mydomain.com/rootname/
RewriteRule ^fr$ fr/ [R=301,L]
RewriteRule ^bg$ bg/ [R=301,L]
RewriteRule ^en$ en/ [R=301,L]
# The Friendly URLs part
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^fr/(.*)$ index.php?q=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^en/(.*)$ index.php?q=$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
In the template, the base href is set by:
<base href="http://localhost/somesite.ext/" />
In the configuration tab of YAMS module, the
MODx Subdirectory is set to
somesite.ext.
Ditto
The content of pages is inserted by [*#content*] and is correctly translated, excepted for the call to Ditto.
The Ditto call is located in each of the TVs for content translation:
"content_fr" / "content_en" and is:
[!Ditto? &sortBy=`menuindex` &sortDir=`ASC` &tpl=`membre_comite` &extenders=`@FILE assets/modules/yams/yams.extender.inc.php` &id=`(yams_id)` &language=`(yams_mname)` !]
Wayfinder
The Wayfinder calls are:
[!Wayfinder? &startId=`0` &level=`2` &config=`menu_horizontal` !]
[!Wayfinder? &config=`menu_vertical` &startId=`[*wf_section*]` &outerTpl=`wfd_outerTpl_main_page`!]
The links inside Wayfinder menus look like:
For French, main language, which is correct:
<a href="http://localhost/somesite.ext/fr/index.php?id=123">...</a>
For English, and that's wrong:
<a href="/somesite.ext/index.php?id=123">...</a>
Inside the Wayfinder configuration files, the chunks are like:
$rowTpl = '@CODE:<li><a href="(yams_doc:[+wf.docid+])" title="" >[[YAMS? &get=`data` &docid=`[+wf.docid+]` &from=`pagetitle` ]]</a>[+wf.wrapper+]</li>';
Any idea about what's wrong?
Thank you very much.