Internationalization - MODX Community Forums https://forums.modx.com/board/?board=104 <![CDATA[Modx babel, all links link to the default context and not the relative one]]> https://forums.modx.com/thread/96240/modx-babel-all-links-link-to-the-default-context-and-not-the-relative-one#dis-post-554731 I'm currently setting up a modx multilingual with modx.

Everything is working fine except that a specific context like /fr/ keep linking to all / resources.

Exemple
http://aikidomontreux.com/fr/horizontal-menu/aikido/

click on aikido and you will be redirected to
http://aikidomontreux.com/horizontal-menu/aikido/

instead of :
http://aikidomontreux.com/fr/horizontal-menu/aikido/

Here is my config :
modx : MODX Revolution 2.2.6-pl (traditional)
babel 2.2.5

gateway plugin :
<?php
if($modx->context->get('key') != "mgr"){
                /* grab the current langauge from the cultureKey request var */
                switch ($_REQUEST['cultureKey']) {
                    case 'fr':
                        /* switch the context */
                        $modx->switchContext('fr');
                        break;
                    case 'de':
                        /* switch the context */
                        $modx->switchContext('de');
                        break;
                    default:
                        /* Set the default context here */
                        $modx->switchContext('web');
                        break;
                }
                /* unset GET var to avoid
                 * appending cultureKey=xy to URLs by other components */
                unset($_GET['cultureKey']);
            }


.htaccess :
RewriteEngine On
RewriteBase /



# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^aikidomontreux\.com [NC]
RewriteRule (.*) http://aikidomontreux.com/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# DO NOT USE BOTH
#
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^www\.example-domain-please-change\.com [NC]
#RewriteRule (.*) http://www.example-domain-please-change.com/$1 [R=301,L]



# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent
# https://www.domain.com when your cert only allows https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example-domain-please-change.com/$1 [R=301,L]





# redirect all requests to /de/favicon.ico and /fr/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|fr|de)/favicon.ico$ favicon.ico [L,QSA]

# redirect all requests to /de/assets* and /fr/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|fr|de)/assets(.*)$ assets$2 [L,QSA]

# redirect all other requests to /de/* and /fr/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(en|fr|de)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]


contexts :
web
base url : /
culture key : en
site url : http://aikidomontreux.com/
fr
base url : /fr/
culture key : fr
site url : http://aikidomontreux.com/fr/
de
base url : /de/
culture key : de
site url : http://aikidomontreux.com/de/]]>
https://forums.modx.com/thread/96240/modx-babel-all-links-link-to-the-default-context-and-not-the-relative-one#dis-post-554731 Mon, 23 Oct 2017 05:01:31 +0000 https://forums.modx.com/thread/96240/modx-babel-all-links-link-to-the-default-context-and-not-the-relative-one#dis-post-554731
<![CDATA[Babel - Switching between languages without loading the whole template]]> https://forums.modx.com/thread/102847/babel---switching-between-languages-without-loading-the-whole-template#dis-post-554073 https://anyscreensize.com/blog/modx-multilingual/ ), everything works great like it has to.

Right now I have 4 language pages and every page will contain two subpages, so I have 3 templates for each page. I have created home pages for other languages by duplicating the main page(web) and then put it under the appropriate language tree, like you see on the picture:

https://imgur.com/a/6a1GV

Right now i have a Content field for each language page, which has too much of a html code inside of it.

QUESTION: How to load the pages so only the text in the pages will refresh without loading the whole template again if I switch between the languages?

Thank you for your help, Miha.]]>
https://forums.modx.com/thread/102847/babel---switching-between-languages-without-loading-the-whole-template#dis-post-554073 Sat, 23 Sep 2017 04:26:54 +0000 https://forums.modx.com/thread/102847/babel---switching-between-languages-without-loading-the-whole-template#dis-post-554073
<![CDATA[Avoiding duplicate pages in muti-language site]]> https://forums.modx.com/thread/50942/avoiding-duplicate-pages-in-muti-language-site#dis-post-548481
1) Is there a way to post the same page in two languages?
2) is there a way to have a template for each language on the same page/document?

I could use the getfield snippet but this needs to be easy to administrate as well as duplicate. I don’t want to leave too much thinking for the client to deal with.

I was able to work out some duplicate content issues by using ditto and custom tpl for each language. This worked fine with simple content but will not work with this more complex page structure.]]>
https://forums.modx.com/thread/50942/avoiding-duplicate-pages-in-muti-language-site#dis-post-548481 Thu, 02 Feb 2017 12:54:17 +0000 https://forums.modx.com/thread/50942/avoiding-duplicate-pages-in-muti-language-site#dis-post-548481
<![CDATA[multilingual website without babel or migxmultilang]]> https://forums.modx.com/thread/101523/multilingual-website-without-babel-or-migxmultilang#dis-post-547868
Several years ago I implemented a multilingual website following the "gateway" tutorial:

https://docs.modx.com/revolution/2.x/administering-your-site/contexts/using-one-gateway-plugin-to-manage-multiple-domains

My implementation was working fine but today there are new plugins such as Babel or MigxMultiLang

I try to avoid to have too many plugins on my websites

Is it really worth installing Babel or MigxMultiLang? Are there pro and cons regarding these plugins compared with the gateway method ?

Thank you and I wish you all a happy New Year ! smiley]]>
https://forums.modx.com/thread/101523/multilingual-website-without-babel-or-migxmultilang#dis-post-547868 Sun, 08 Jan 2017 03:28:14 +0000 https://forums.modx.com/thread/101523/multilingual-website-without-babel-or-migxmultilang#dis-post-547868
<![CDATA[Different parent for resource list tv (in manager) based on context]]> https://forums.modx.com/thread/96615/different-parent-for-resource-list-tv-in-manager-based-on-context#dis-post-547802
Problem is that I have a container with widgets for each language. However, in the resource list tv I can only set one ID, so for each language the widgets from that language are shown.

Is there a way to make the parent in the resource list tv dynamic, and have it changed based on the context in which the resource that is being edited is in? I know how to get the context in the frontend, but I don't know if it's possible to get it in the backend, since it's always 'manager' there.]]>
https://forums.modx.com/thread/96615/different-parent-for-resource-list-tv-in-manager-based-on-context#dis-post-547802 Thu, 05 Jan 2017 04:33:35 +0000 https://forums.modx.com/thread/96615/different-parent-for-resource-list-tv-in-manager-based-on-context#dis-post-547802
<![CDATA[unlink resource translate with babel]]> https://forums.modx.com/thread/101308/unlink-resource-translate-with-babel#dis-post-546633
I want unlink DE link traslation:

The result is:

is wrong! Are you have the same problem ?]]>
https://forums.modx.com/thread/101308/unlink-resource-translate-with-babel#dis-post-546633 Wed, 23 Nov 2016 10:54:24 +0000 https://forums.modx.com/thread/101308/unlink-resource-translate-with-babel#dis-post-546633
<![CDATA[Revolution Translation and Translation Tool]]> https://forums.modx.com/thread/91796/revolution-translation-and-translation-tool#dis-post-546225
Anyone is now welcome to contribute to the translations via Crowdin, however, acceptance and integration is the responsibility of Proofreaders.

Current Translation Poofreaders:

Before you get started at Crowdin, you'll need an account to be a translator (it's free). To get one, use this invite link. You have two choices when it comes to translations. You can choose one or both, however, the in-context editing makes things like setup and transactional message strings less likely to see.

Method A: Crowdin Oline Translation

  1. Go to https://crowdin.net/project/modx-revolution
  2. Pick a language you want to translate
  3. Select the file you want to translate (status bar shows progress: grey - not translated, blue - suggestions sent, green - suggestions approved)
  4. Translate (items with red bullet have no suggestion, you should focus on them)

Method B: In-Context Translation

  1. Request the login credentials for in-context editing from help [at] modx [dot] com
  2. Go to http://c1291.paas2.tx.modxcloud.com/manager/ (Firefox freezes on this page, try to use other browser)
  3. Login with your crowdin account in the dialog and pick a language you want to translate
  4. Login to the MODX manager with the credentials from step 1

If you have any questions about translations or contributing, please email help [at] modx [dot] com.]]>
https://forums.modx.com/thread/91796/revolution-translation-and-translation-tool#dis-post-546225 Mon, 07 Nov 2016 09:44:32 +0000 https://forums.modx.com/thread/91796/revolution-translation-and-translation-tool#dis-post-546225
<![CDATA[Babel - BabelLinks adds "?html=" to the link]]> https://forums.modx.com/thread/101188/babel---babellinks-adds-html-to-the-link#dis-post-546156
I'm using the latest Babel-Version and the latest MODx-install.

Everything is working fine, except the BabelLinks are adding a strange

?html=


to the link.

This is what's gappening:

Default-context: www.site.com
EN-context: www.site.com/en/?html=
BR-context: www.site.com/br/?html=

However, the links are working fine, all links are going to the correct page etc. But I'd like to get rid off this strange "?html="-thing.]]>
https://forums.modx.com/thread/101188/babel---babellinks-adds-html-to-the-link#dis-post-546156 Thu, 03 Nov 2016 11:32:00 +0000 https://forums.modx.com/thread/101188/babel---babellinks-adds-html-to-the-link#dis-post-546156
<![CDATA[Ex Yu forums (Serbian, Croatian, Macedonian, Bosnian, Montenegro)]]> https://forums.modx.com/thread/100304/ex-yu-forums-serbian-croatian-macedonian-bosnian-montenegro#dis-post-542539 https://forums.modx.com/thread/100304/ex-yu-forums-serbian-croatian-macedonian-bosnian-montenegro#dis-post-542539 Fri, 17 Jun 2016 01:27:55 +0000 https://forums.modx.com/thread/100304/ex-yu-forums-serbian-croatian-macedonian-bosnian-montenegro#dis-post-542539 <![CDATA[404 Error after installing babel on MODXCloud]]> https://forums.modx.com/thread/97143/404-error-after-installing-babel-on-modxcloud#dis-post-541952 http://designfromwithin.com/blog/modx-multilingual

I'm getting a 404 error after doing everything from the htaccess, plugin, babel and the site_start value. I only have one language, /cn/. I already created a cn sample page with the right start_value. I have lots of page already and my start page is 297. But when I go to www.website.com/cn/index.html, Page Not Found Error.

Here's my .htacess. Changed the domain name of my company to website.com for privacy. I cannot show any codes but here's my htacess

RewriteEngine On
RewriteBase /

# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
#RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
#
# or for the opposite domain.com -> www.domain.com use the following
# DO NOT USE BOTH
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.website\.com [NC]
RewriteRule (.*) http://www.website.com/$1 [R=301,L]



# Rewrite secure requests properly to prevent SSL cert warnings, e.g. prevent 
# https://www.domain.com when your cert only allows https://secure.domain.com
#RewriteCond %{SERVER_PORT} !^443
#RewriteRule (.*) https://example-domain-please-change.com/$1 [R=301,L]



# redirect all requests to /de/favicon.ico and /nl/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|cn)/favicon.ico$ favicon.ico [L,QSA]
						  
# redirect all requests to /de/assets* and /nl/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|cn)/assets(.*)$ assets$2 [L,QSA]
						 
# redirect all other requests to /de/* and /nl/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(en|cn)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]



and here's my gateway plugin

if($modx->context->get('key') != "mgr"){
			/* grab the current langauge from the cultureKey request var */
			switch ($_REQUEST['cultureKey']) {
				case 'cn':
					/* switch the context */
					$modx->switchContext('Chinese');
					break;
				default:
					/* Set the default context here */
					$modx->switchContext('web');
					break;
			}
			/* unset GET var to avoid
			 * appending cultureKey=xy to URLs by other components */
			unset($_GET['cultureKey']);
		}


Chinese context looks like this:

]]>
https://forums.modx.com/thread/97143/404-error-after-installing-babel-on-modxcloud#dis-post-541952 Fri, 27 May 2016 06:10:52 +0000 https://forums.modx.com/thread/97143/404-error-after-installing-babel-on-modxcloud#dis-post-541952
<![CDATA[l10ntag fallback language?]]> https://forums.modx.com/thread/100137/l10ntag-fallback-language#dis-post-541465 ]]> https://forums.modx.com/thread/100137/l10ntag-fallback-language#dis-post-541465 Fri, 13 May 2016 01:11:06 +0000 https://forums.modx.com/thread/100137/l10ntag-fallback-language#dis-post-541465 <![CDATA[Babel+getResources menu doesn't switch across the context]]> https://forums.modx.com/thread/99697/babel-getresources-menu-doesn-t-switch-across-the-context#dis-post-539246
I'm pretty new to MODx, especially to multilangual part, sorry for the newbish qustion.

I've installed Babel, everything works perfectly except one thing - when I switch to another context, my menu links do not change, they are the same. It's very frustrating, as I've tried nearly everything that was in google, now I hope I can find help here.

My current menu snippet call looks like this:

[[!getResources? &parents=`[[++site_start]]` &limit=`5` &tpl=`menu_tpl`]]


site_start is a context setting, that indicates parent ID for the context, as it described in tutorials.

I've tried [[++parents]] for &parents, and also I've tried:

[[!getResources? &parents=`[[BabelTranslation? &contextKey=`[[++cultureKey]]`]]` &limit=`5` &tpl=`menu_tpl`]]


Nothing helps. For example, I've made a doc called "test", and it's english version "testen". When I'm on the main page of the site and switch to English context, everything changes to English language, even the menu title changes from "test" to "testen", but when I click on the link it still leads to test.html, not en/test.html

I'm using nginx, if's important.]]>
https://forums.modx.com/thread/99697/babel-getresources-menu-doesn-t-switch-across-the-context#dis-post-539246 Sat, 05 Mar 2016 06:59:48 +0000 https://forums.modx.com/thread/99697/babel-getresources-menu-doesn-t-switch-across-the-context#dis-post-539246
<![CDATA[Nginx + revo + babel + gallery issue with phpthumbs [solved]]]> https://forums.modx.com/thread/97289/nginx-revo-babel-gallery-issue-with-phpthumbs-solved#dis-post-537862
We recently decided for performance purpose to move to nginx + php-fpm on our plesk 12 server.

we faced an issue with the assets path and url rewrite.

First thing was to create new nginx rules for rewrite purpose we started with :


if (!-e $request_filename){
    rewrite ^/(fr|en)?/?(.*)$ /index.php?cultureKey=$1&q=$2 last;
}

expires 7d;
add_header X-UA-Compatible IE=edge,chrome=1;
gzip_proxied any;

gzip on;


It was far from perfect and we added new rules at the begining :


rewrite ^/(fr|en)/assets(.*)$ /assets$2 break;

rewrite ^/(fr|en)/assets/main/css(.*)$ /assets/main/css$2 break;

rewrite ^/(fr|en)/assets/main/js(.*)$ /assets/main/js$2 break;

rewrite ^/(fr|en)/assets/img(.*)$ /assets/img$2 break;

if (!-e $request_filename){
    rewrite ^/(fr|en)?/?(.*)$ /index.php?cultureKey=$1&q=$2 last;
}

expires 7d;
add_header X-UA-Compatible IE=edge,chrome=1;
gzip_proxied any;

gzip on;


everything was nice, BUT we had trouble with the english version of the site where the gallery thumbs were not displayed.

this was due to :

<img class="gal-item" src="/assets/components/gallery/connector.php?action=web/phpthumb&ctx=wen&w=100&h=100&zc=1&far=C&q=90&src=%2Fen%2F%2Fassets%2Fgallery%2F3%2F62.jpg" title="2_Le_domaine_1.jpg">


If you look at the src parameter, you will see it throw a /en//assets/....

I tried evereything in my mind, asked Menno Pietersen for ideas, dig again and found a quick and dirty fix.

I created an output filter as this :

$output='';
$t = $input;
$output = ereg_replace("%2Fen%2F", "", $t);
return $output;


and changed my gallery item thumbs template from :

<a href="[[+image_absolute]]" title="[[+description]]"><img class="[[+cls]]" src="[[+thumbnail]]" alt="[[+name]]" /></a>

to :
<a href="[[+image_absolute]]" title="[[+description]]"><img class="[[+cls]]" src="[[+thumbnail:trim2F]]" alt="[[+name]]" /></a>


This is doing the trick for me as an interim solution.

I am interrested in any idea on how to properly fix it.

Have fun !

Philippe]]>
https://forums.modx.com/thread/97289/nginx-revo-babel-gallery-issue-with-phpthumbs-solved#dis-post-537862 Thu, 04 Feb 2016 09:34:36 +0000 https://forums.modx.com/thread/97289/nginx-revo-babel-gallery-issue-with-phpthumbs-solved#dis-post-537862
<![CDATA[Add a news Lexicon entry using ModX as API from an external script]]> https://forums.modx.com/thread/99313/add-a-news-lexicon-entry-using-modx-as-api-from-an-external-script#dis-post-537208 To retrieve a lexicon value, I can use $modx->lexicon->load but how can I update or create a lexicon entry for a specific language? $modx->lexicon->set with as described on http://api.modx.com/revolution/2.2/db_core_model_modx_modlexicon.class.html ?

$modx->getService('lexicon','modLexicon');
$modx->lexicon->set('mykey',myvalue');

is it the right way or must I use another way?
]]>
https://forums.modx.com/thread/99313/add-a-news-lexicon-entry-using-modx-as-api-from-an-external-script#dis-post-537208 Tue, 19 Jan 2016 11:14:59 +0000 https://forums.modx.com/thread/99313/add-a-news-lexicon-entry-using-modx-as-api-from-an-external-script#dis-post-537208
<![CDATA[Using MIGXmultilang for internationalization]]> https://forums.modx.com/thread/98001/using-migxmultilang-for-internationalization#dis-post-532511
I'm starting a new thread echoing this one that may be misplaced :
http://forums.modx.com/thread/88554/babel-or-migxmultilang?page=3#dis-post-529206

There are some questions about using MIGXmultilang

  1. Is it possible for a translator to access only the translated part of a resource in the manager ?
    For example, dutch people only access the dutch part that concerns them.
  2. Is it possible for MIGXMultilang to switch between languages by IP using something like GeoIP ?
    For example, someone coming from Netherlands gets the right translation even if he was calling the general .com ?
  3. In the same way, is it possible to switch between languages via a select option ?
  4. How would you do to serve dedicated datas from a custom table based on the language ?
  5. And last but not the least, is it possible to not fallback to the default language for specified resources ? There are cases where some resources would not be published at all in a specified language.

Thanks for your help
]]>
https://forums.modx.com/thread/98001/using-migxmultilang-for-internationalization#dis-post-532511 Wed, 30 Sep 2015 12:04:39 +0000 https://forums.modx.com/thread/98001/using-migxmultilang-for-internationalization#dis-post-532511
<![CDATA[Babel Links with resource group]]> https://forums.modx.com/thread/97102/babel-links-with-resource-group#dis-post-528763
babel links is working fine for me but not for member pages where a user group is checked under "resource groups". Is there an $modx->getOption to show "member pages" which can be used to extend babel with an &showResourceGroups like option?


Best,

Mike]]>
https://forums.modx.com/thread/97102/babel-links-with-resource-group#dis-post-528763 Wed, 22 Jul 2015 03:50:37 +0000 https://forums.modx.com/thread/97102/babel-links-with-resource-group#dis-post-528763
<![CDATA[redirect loop in the pages with babel]]> https://forums.modx.com/thread/97507/redirect-loop-in-the-pages-with-babel#dis-post-527235
My modx project is in the wamp/www/ of my server (wamp server)

RewriteEngine On
RewriteBase /babelmodx/



# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
#RewriteCond %{HTTP_HOST} .
#RewriteCond %{HTTP_HOST} !^localhost/babelmodx [NC]
#RewriteRule (.*) http://localhost/babelmodx/$1 [R=301,L]





i've also uncomment the 3 lasts lines but doesn't work ... sad




# The Friendly URLs part
# detect language when requesting the root (/)
RewriteCond %{HTTP:Accept-Language} !^de [NC]
RewriteRule ^$ en/ [R=301,L]
RewriteRule ^$ de/ [R=301,L]
 

# redirect all requests to /en/favicon.ico and /de/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|nl)/favicon.ico$ favicon.ico [L,QSA]

 

# redirect all requests to /en/assets* and /de/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(en|nl)/assets(.*)$ assets$2 [L,QSA]
 
# redirect all other requests to /en/* and /de/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(en|nl)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]




My Babel Plugin :


<?php
if($modx->context->get('key') != "mgr")
{
  /* grab the current langauge from the cultureKey request var */
  switch ($_REQUEST['cultureKey']) {
    case 'nl':
      /* switch the context */
      $modx->switchContext('nl');
      break;
    default:
      /* Set the default context here */
      $modx->switchContext('web');
      break;
}
/* unset GET var to avoid
 * appending cultureKey=xy to URLs by other components */
unset($_GET['cultureKey']);
}




Sorry about my bad english and thanks you]]>
https://forums.modx.com/thread/97507/redirect-loop-in-the-pages-with-babel#dis-post-527235 Sun, 21 Jun 2015 03:59:11 +0000 https://forums.modx.com/thread/97507/redirect-loop-in-the-pages-with-babel#dis-post-527235
<![CDATA[BabelLinks not showing up in Babel 3.0.0Beta4]]> https://forums.modx.com/thread/97142/babellinks-not-showing-up-in-babel-3-0-0beta4#dis-post-525848 When updating to Babel 3.0.0Beta4 the BabelLinks are gone.
o Language (context) switching with manually adjusting the site address is working fine.
o Adding this Babel code for the active link in the template is giving the expected response for the active context (a single language item).
<li><a href="[[+url]]" class="[[++cultureKey]][[+active:notempty=` [[+active]]`]]">[[%babel.language_[[++cultureKey]]? &topic=`default` &namespace=`babel`]]</a></li>

Just the complete menu called with [[BabelLinks]] is missing.

I have been following the "Step by Step instructions" in this document http://www.multilingual-modx.com/blog/2011/seo-friendly-multilingual-websites-with-modx-and-babel.html

Do you have a suggestion where to continue looking?]]>
https://forums.modx.com/thread/97142/babellinks-not-showing-up-in-babel-3-0-0beta4#dis-post-525848 Thu, 21 May 2015 04:03:26 +0000 https://forums.modx.com/thread/97142/babellinks-not-showing-up-in-babel-3-0-0beta4#dis-post-525848
<![CDATA[Adventures with Babel 3.0.0-beta1]]> https://forums.modx.com/thread/95280/adventures-with-babel-3-0-0-beta1?page=2#dis-post-523107
When creating the contexts to prepare the installation before installing Babel, the permissions automatically given to the Administrator group are a bit odd. They are given "context" policy with an authority of 9999. The web context has the Administrator policy with an authority of 0. I'm not sure if this really makes any significant difference, but it does seem odd.

More notes on this localhost installation to follow.]]>
https://forums.modx.com/thread/95280/adventures-with-babel-3-0-0-beta1?page=2#dis-post-523107 Sat, 21 Mar 2015 09:08:57 +0000 https://forums.modx.com/thread/95280/adventures-with-babel-3-0-0-beta1?page=2#dis-post-523107
<![CDATA[NGINX: rewriting not working with modx revolution]]> https://forums.modx.com/thread/95858/nginx-rewriting-not-working-with-modx-revolution#dis-post-518833
It worked fine with Apache+PHP5+MYSQL configuration in Centos6.

Nearly I've changed my VPS to Debian Weezy 7, and installed nginx+php5-fpm+mysql.

Here's list of not working URL's that by browser keep trying to download them as HTML files or unknown file.


Here's list of working URL's


Here's list of URL's with 503 error response

I've looked up on offical sites and forums about this issue, but it seems to be not working how I expected (half working). What have I missed?


----------
/etc/nginx/nginx.conf

user www-data;
worker_processes 2;

pid /var/run/nginx.pid;

events {
	worker_connections 768;
	# multi_accept on;
}

http {

	##
	# Basic Settings
	##

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	
	include /etc/nginx/mime.types;
	default_type application/octet-stream;

	##
	# Logging Settings
	##

	access_log /var/log/nginx/access.log;
	error_log /var/log/nginx/error.log warn;

	##
	# Gzip Settings
	##

	gzip on;
	gzip_disable "MSIE [1-6].(?!.*SV1)";

	gzip_vary on;
	gzip_proxied any;
	gzip_comp_level 1;
	gzip_min_length 1100;
	gzip_buffers 16 8k;
	gzip_http_version 1.1;
	gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;

	##
	# Virtual Host Configs
	##

	include /etc/nginx/conf.d/*.conf;
	include /etc/nginx/sites-enabled/*;
}



----------

/etc/nginx/sites-available/site.kz
server {
	listen   80; ## listen for ipv4; this line is default and implied
	listen   [::]:80 default_server ipv6only=on; ## listen for ipv6
	server_name site.kz www.site.kz;
	root /usr/share/nginx/www/site.kz;
	index index.php index.html index.htm;
	client_max_body_size 30M;
	
	error_log /var/log/nginx/site.kz.error_log notice;
	rewrite_log on;
	
	location @modx-rewrite {
	   rewrite ^/(.*)$ /index.php?q=$1 last;
	}
	
	set $lang kz;

	# choose the language that appears first in the accept_language header
	if ($http_accept_language ~* "(kz|ru)") {
		set $lang $1;
	}

	location ~ ^/$ {
		rewrite ^ $lang/ redirect;
	}

	location ~ ^/(kz|ru) {
		# redirect favicon.ico and assets/* and core/* requests to site root
		rewrite ^/(kz|ru)/(favicon.ico|assets.*|core.*)$ /$2 redirect;
		# main Babel rewrite
		rewrite ^/(kz|ru)/(.*)$ /?cultureKey=$1&q=$2 break;
		# MODX rewrite
		try_files $uri $uri/ @modx-rewrite;
	}
	
	location ~ \.php$ {
		try_files $uri =404;
		fastcgi_split_path_info ^(.+\.php)(.*)$;
		fastcgi_pass unix:/var/run/php5-fpm.sock;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		include fastcgi_params;
		fastcgi_ignore_client_abort on;
		fastcgi_param  SERVER_NAME $http_host;
	}

	location / {
		try_files $uri $uri/ @modx-rewrite;
	}

	location ~ /\.ht {
				deny  all;
	}
}




----------
Previous working Apache .htaccess configuration

# The Friendly URLs part
# detect language when requesting the root (/)
RewriteCond %{HTTP:Accept-Language} !^kz [NC]
RewriteRule ^$ kz/ [R=301,L]
RewriteRule ^$ ru/ [R=301,L]
 
# redirect all requests to /kz/favicon.ico and /ru/favicon.ico
# to /favicon.ico
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(kz|ru)/favicon.ico$ favicon.ico [L,QSA]
 
# redirect all requests to /kz/assets* and /ru/assets* to /assets*
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(kz|ru)/assets(.*)$ assets$2 [L,QSA]

# redirect all requests to /kz/core* and /ru/core* to /core*
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(kz|ru)/core(.*)$ core$2 [L,QSA]
 
# redirect all other requests to /kz/* and /ru/*
# to index.php and set the cultureKey parameter
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(kz|ru)?/?(.*)$ index.php?cultureKey=$1&q=$2 [L,QSA]
]]>
https://forums.modx.com/thread/95858/nginx-rewriting-not-working-with-modx-revolution#dis-post-518833 Tue, 20 Jan 2015 11:45:40 +0000 https://forums.modx.com/thread/95858/nginx-rewriting-not-working-with-modx-revolution#dis-post-518833