This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 15 replies, has 5 voices.

Last updated by Michael 3 years, 8 months ago.

Assigned support staff: Otto.

Author Posts
December 9, 2015 at 2:57 pm #764869

sanderv-13

I am trying to: get my posts working

URL of (my) website where problem appears:hidden link

I expected to see: the post

Instead, I got: too many redirects.

This happend after i updated WPML. I want to get my site live, it worked untill now.
I've deactivated other plugins but unfortunately it still isn't working.

Greetings

December 9, 2015 at 9:22 pm #765290

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi Sander,

When I access your site, I see a page under construction and does not happen any redirect.

Are you using any redirect rule in the .htaccess file? Please could you post the contents of the .htaccess file for me to see?

Thank you.

December 10, 2015 at 9:28 am #765591

sanderv-13

Hi Bruno, thanks for your reply.
Unfortunately I had to put the site in maintenance mode because off the fact I couldn't resolve the issue, i've tried the troubleshooting options within WPML but this made it actually worse. It only affected some posts, but it's look kind of messy that those posts receive the 'too many redirects' pages.. Because I need it live asap I'm reuploading an back-up before the WPML and wordpress 4.4 update. After this is done, I'll give it another shot on a testserver. I'll let you know.

The htaccess I've used (before i added an maintenance.html rule) is the standard:

 # BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

It definitely had something to do with the Permalink structure.
Because after I changed from ''postname" to default the pages worked again.
Wordpress 4.4 update worked fine, after I updated to WPML the trouble started. Perhaps an compatibility issue? I'll get back to you asap.

p.s. Can this topic be made private?

December 10, 2015 at 10:25 am #765664

sanderv-13

Hi Bruno, I've replicated the issue on a test server, unfortunately there is no domain attached to this ip, so you'll have to temporary edit your hosts file, i this is no problem. Perhaps you could PM me, so I can hand the correct IP/Name to you and you can take a look at it.

Thank you in advance.

December 10, 2015 at 6:01 pm #766255

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Bruno is off today. If you don´t mind I will take care of this ticket.

Can you please increase the memory limit to 256MB:
https://codex.wordpress.org/Editing_wp-config.php#Increasing_memory_allocated_to_PHP

Your configuration now is 40M and the minimum requirements are 128M

I would like to request temporary access (wp-admin and FTP) to your site to take better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok for you.

** IMPORTANT **

- Please make a backup of site files and database before providing us access.

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

Kind Regards,

Otto

December 11, 2015 at 9:03 am #766657

Pieter

My client has exactly the same problem with the latest update. So I thought I'd chip in:

We have a website with two languages:

* NL
* FR

Steps to reproduce:

* Create and save a blogpost in first language
* Create a new translation of said blogpost using the "+" under "Translate" in the "language" meta box
(* Press overwrite with content from original post, don't know if this is necessary)
* Save
* View translation post
* Use language switcher to go to original post
-> Too many redirects.

Was able to reproduce this on two seperate WordPress installations.

This doesn't seem to happen when adding a new post in the other language and afterwards setting it as a translation of the original post.

Looking forward to hearing an update as soon as possible.

December 11, 2015 at 10:25 am #766768

Pieter

I forgot to add a step. After pressing "overwrite", I pressed "translate seperately", edited the necessary fields and edited the slug to reflect the other language's title.

It only seems to happen when the slug is different from the original slug. When I change the slug to be identical to the original slug, the problem goes away.

December 11, 2015 at 10:47 am #766791

Pieter

Update #3, found the issue. In WordPress 4.4 there is a new feature called old slug redirection. WordPress will automatically 301 redirect any page containing the old slug to the new page when you changed the slug. They do this by saving a "_wp_old_slug" metafield with the post as soon as the slug is updated. It's a neat feature, but unfortunately it doesn't take plugins like WPML into account, they probably expect third party plugins to handle this.

(TEMPORARY) FIX:
Luckily they use a filter to allow adjustments to this redirect URL. If we make it empty, the redirect is cancelled. Place this in your functions.php:

add_filter('old_slug_redirect_url', function($link) {
		if($link == get_the_permalink()) { // If the link to redirect to equals the current (correct) permalink, fail.
			return '';
		};

		return $link;
	});

@wpml Developers: could you include this in your next bugfix release and credit me (hidden link - hidden link)? Thanks!

December 11, 2015 at 11:15 am #766831

sanderv-13

Hi @pieter, thank you very much. This is great. Your fix, fixed my problem as well.
@otto if you still want to take a look at the site, this is no problem. Let me know.

December 11, 2015 at 11:55 am #766866

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thank you Pieter! I´ll pass your fix to our developers.

I´m really glad it´s fixed now. sanderv-13 if we need to access to your site I´ll let you know, it´s not needed right now.

Kind Regards

December 11, 2015 at 12:08 pm #766883

Pieter

Great to hear this fixed the problem!

@otto: could you guys keep me posted on progress? You can contact me at team@siteoptimo.com. Thanks 🙂

December 11, 2015 at 12:12 pm #766888

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello again,

I wasn´t able to replicate the issue with a minimal install and WPML 3.3.3.

Did you tried with this last version?

Thanks!

Kind Regards

December 11, 2015 at 12:13 pm #766889

Pieter

Yes.

December 21, 2015 at 1:54 pm #773758

sanderv-13

Hi Otto, is this code added to the new version:
WPML Multilingual CMS 3.3.4?
Thanks!

December 21, 2015 at 5:40 pm #774071

Otto
Supporter

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello sanderv-13,

I wasn´t able to reproduce the issue in a fresh install with 3.3.3, and I can´t do it also with 3.3.4. So I think it is solved.

Anyway I suggest you to try it in a test environment or before a full and reliable back up.

Let me know if you have any issue with that please.

Kind Regards,

Otto

The topic ‘[Closed] Hi, several posts on my website return a page: too many redirects.’ is closed to new replies.