<![CDATA[ Too many redirects - My Forums]]> https://forums.modx.com/thread/?thread=104256 <![CDATA[Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects?page=2#dis-post-560759
Fresh install, new website. MODX 1.4.5 - YAMS 1.2.0 RC7

When I go to the first page http://sub.domain.com/ -> redirect to http://sub.domain.com/fr/home.html -> redirect to http://sub.domain.com/ -> etc. (no ending)

If I go to an secondary page: http://sub.domain.com/presentation.html -> redirect to http://sub.domain.com/http://sub.domain.com/fr/presentation.html and display the default page (not the presentation.html).

Yes, http://sub.domain.com twice !!!!

My .htaccess file
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /

# 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 and images from rewrite rules
RewriteRule ^(manager|assets|js|css|images|img)/.*$ - [L]
RewriteRule \.(jpg|jpeg|png|gif|ico)$ - [L]

# Redirect from mydomain.com/rootname to mydomain.com/rootname/
RewriteRule ^en$ en/ [R=301,L]
RewriteRule ^fr$ fr/ [R=301,L]
RewriteRule ^de$ de/ [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 ^de/(.*)$ 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]


I don't understand.

Heeeelp !]]>
neoziox Aug 14, 2018, 04:40 PM https://forums.modx.com/thread/104256/too-many-redirects?page=2#dis-post-560759
<![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects?page=2#dis-post-560786 Quote from: iusemodx at Aug 15, 2018, 12:56 PM
@neoziox

You should be posting this either in the Evolution GitHub or the specific YAMS repository e.g here or here, not here - the Forum is hardly used nowadays by Evo users

Done! Thanks @iusemodx]]>
neoziox Aug 15, 2018, 01:02 PM https://forums.modx.com/thread/104256/too-many-redirects?page=2#dis-post-560786
<![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects?page=2#dis-post-560785
You should be posting this either in the Evolution GitHub or the specific YAMS repository e.g here or here, not here - the Forum is hardly used nowadays by Evo users]]>
iusemodx Aug 15, 2018, 12:56 PM https://forums.modx.com/thread/104256/too-many-redirects?page=2#dis-post-560785
<![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560783 Quote from: BobRay at Aug 15, 2018, 01:36 AM
Have you tried installing the current version of YAMS? The RC in the one you have stands for "Release Candidate," so it's close to being a beta version.

When I install the 1.1.9 version, in the "Multilingual Templates" tab (inside the Module's parameters), I have an error:

Fatal error: Uncaught Error: Call to undefined function mysql_num_rows() in /home/users3/p/pbf5461/www/assets/modules/yams/class/yams.class.inc.php:2897 Stack trace: #0 /home/users3/p/pbf5461/www/assets/modules/yams/yams.module.inc.php(2525): YAMS->GetTemplateInfo(Object(mysqli_result)) #1 /home/users3/p/pbf5461/www/manager/processors/execute_module.processor.php(84) : eval()'d code(23): require('/home/users3/p/...') #2 /home/users3/p/pbf5461/www/manager/processors/execute_module.processor.php(84): eval() #3 /home/users3/p/pbf5461/www/manager/processors/execute_module.processor.php(63): evalModule('/**\r\n * YAMS\r\n ...', Array) #4 /home/users3/p/pbf5461/www/manager/index.php(611): include_once('/home/users3/p/...') #5 {main} thrown in /home/users3/p/pbf5461/www/assets/modules/yams/class/yams.class.inc.php on line 2897


And I still have the problem :'(]]>
neoziox Aug 15, 2018, 07:49 AM https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560783
<![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560778 ]]> BobRay Aug 15, 2018, 01:36 AM https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560778 <![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560777 So, what’s wrong.]]> neoziox Aug 14, 2018, 11:31 PM https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560777 <![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560775 BobRay Aug 14, 2018, 11:09 PM https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560775 <![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560774 Mine is 1.2

I don’t found the line inside the index.php file. Are you sure this is for Evo?]]>
neoziox Aug 14, 2018, 10:54 PM https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560774
<![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560773
I think you're still bouncing because your error page is not being found either (make sure it's published).

When you make a new request, the index.php file is run. It contains this line:

$modx->initialize('web');


That initializes the web context. After that, resources in other contexts basically don't exist and throw a 404 file-not-found error. MODX redirects to your error_page on any 404, so if the request is for a page in a different context, you're always going to your error page. If the error page is not found (again, because it's in a different context), you'll just go around in circles until the server stops you.

There are various ways around this with mult-language multi-context sites. I'm not sure which one YAMS uses, or even if YAMS uses multiple contexts (or even if Evo *has* multiple contexts). There are several multi-language solutions for MODX Revolution. The migxMultiLang extra seems to be very popular.

FYI, there is a newer version of YAMS than the one you have (which I believe had a number of problems):

https://modx.com/extras/package/yams]]>
BobRay Aug 14, 2018, 10:44 PM https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560773
<![CDATA[Re: Too many redirects]]> https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560771 First, when I read your answer, I said to myself: Great! It's brilliant!
But, I set the [(error_page)] to another page id and… still not working! Infinite loop. sad

Plus, I'm not sure I understand your third paragraph. Can you tell me more?]]>
neoziox Aug 14, 2018, 10:28 PM https://forums.modx.com/thread/104256/too-many-redirects#dis-post-560771