[Closed] (Yet Another) 404 Error

Home Support English Support [Closed] (Yet Another) 404 Error

This topic contains 20 replies, has 2 voices, and was last updated by  Harshad 1 year, 2 months ago. The support staff assigned to this topic is Dominykas.

Viewing 15 posts - 1 through 15 (of 21 total)
Author Posts
Author Posts
January 13, 2013 at 1:58 am #95986

Breanne

Similar to some of the 404 error reports elsewhere, but none of the reported solutions work.

Default language: English
Secondary languages: Chinese (trad), Chinese (simp)

Visiting a Chinese page, and then an English page results in a 404 when using pretty permalinks.

The default (?p=) structure works without error in all languages.

Adding a flush_rewrite_rules call in the theme functions causes the permalinks to start to working again and makes it so that you can see the English page content again.

However, remove the flush_rewrite_rules call and the problem returns: English pages give 404, Chinese resolve properly.

Viewing the homepage by visiting the site root (http://wccac.net/external/ <- logo links to here) works in all languages, but viewing that same page by full URL (http://wccac.net/external/welcome/ <- home menu link links to here) does not work in English.

Changing / resaving the permalink structure does not fix the issue, even temporarily; only hard-calling flush_rewrite_rules does.

The language URL format is subdirectory.
mod_rewrite is enabled and .htaccess in the WP root is writable

The 404 occurs using a custom theme as well as with TwentyTwelve.

WPML, WP both at latest versions.

January 14, 2013 at 5:42 am #96027

Harshad
Forum moderator

Dear Breanne,

Can you please try this:
go to wpml -> support -> click on the troubleshooting link at the bottom of the page. On the troubleshooting page click on the set language information button.

January 14, 2013 at 5:50 am #96029

Breanne

Already done that, many times (just forgot to include it in the list of attempted solutions ;-))

January 14, 2013 at 6:52 am #96042

Harshad
Forum moderator

Dear Breanne,

To troubleshoot further can you please send me your ftp and wp-admin details to my email address?

Please include this forum link for reference.

January 17, 2013 at 10:15 pm #97326

Breanne

Can you confirm receipt of the requested information via email? Should have got it on the 14th.

[Edit: Ah I see now the thread status has updated to Assigned. wasn't showing that way before. Sorry!]

Thanks,

-Breanne

January 18, 2013 at 9:40 am #97457

Harshad
Forum moderator

Dear Breanne,

Sorry for delay, On further investigation I found that even if we de-activate WPML plugin, viewing page by full URL http://wccac.net/external/welcome/ redirects to 404 page.

May be If you’re creating post types programmatically (inside your plugin, whatever), you might need a way to automatically flush your rewrite rules.

I have re-added the flush_rewrite_rules(false); in your theme's functions.php file which causes the permalinks to start to working again.

January 18, 2013 at 3:12 pm #97562

Breanne

Thank you for confirming that deactivating the WPML plugin is sufficient to determine that it is not the cause. The theme developer was suggesting that I would have to do a full / clean uninstall of WPML to rule it out as a cause.

Back to the drawing board, I guess; will keep searching for a resolution. If it would be possible to leave this thread open for a bit longer in the event that we find more details that do pertain to WPML and these 404s, it would be appreciated.

January 18, 2013 at 4:08 pm #97583

Breanne

I am sorry to say that in the course of fixing a different bug in the theme (one of the custom post types did not have its has_archive argument set – this is the only change that has been made), I have confirmed that disabling WPML does not solve the problem with the 404s.

Please note: when WPML is enabled, the 404s ONLY happen with the default (English) language site. The secondary languages do not give 404 messages.

In addition, using flush_rewrite_rules in functions.php no longer provides a workaround, and the 404s are always present.

I have re-done the set language option, regenerated permalinks, etc.

January 19, 2013 at 6:02 am #97676

Harshad
Forum moderator

Sorry If I am not getting, are we on the same bug?
Can you please explain me in detail?

January 19, 2013 at 6:12 am #97681

Breanne

Yes, same bug. There had been a separate bug in the theme I was using which was causing inconsistencies in the generation of 404s. Now that bug has been resolved, which has caused the previous solution of flush_rewrite_rules to no longer serve as a workaround.

The situation at present is this:

Every English page gives a 404 whenever WPML is enabled; there are no 404 errors for non-English pages. In addition, the bug does not occur when WPML is disabled. Flushing the rewrite rules in functions.php does not workaround the issue, and the 404s remain even when the rewrite is present.

There may be a theme compatibility issue (as the same problem has been reported by another user of the same theme), and the theme developer is investigating. However, we would like to rule out WPML as the cause of the 404s, given that the error only occurs when WPML is enabled.

Let me know if anything else is unclear :-)

January 19, 2013 at 6:23 am #97682

Harshad
Forum moderator

Thanks, I have disabled WPML still I get 404 page on following pages.
http://wccac.net/external/welcome/
http://wccac.net/external/about-us/

January 19, 2013 at 7:58 am #97698

Breanne

Um… Those pages are working fine for me (and I've checked multiple devices and browsers…)

WPML is disabled, pages are working…

Not sure why you aren't seeing the same?

January 19, 2013 at 8:06 am #97700

Harshad
Forum moderator

Dear Breanne,

Sorry it was not working before, I have re-checked it.
What I have found is, after activating WPML the English pages did work.
But as soon as I checked the Chinese pages for ex.
http://wccac.net/external/zh-hans/resources/
Then clicked the English link.
http://wccac.net/external/resources/
I get 404 error on all English pages.

I will look into this and update you.

January 28, 2013 at 5:31 pm #99946

Breanne

Update on my end:

After updating to the latest WP and WPML, I still have the same problem. However, adding flush_rewrite_rules(false) to the functions.php file from my theme now serves as a workaround, and lets me view each page properly (no 404s).

That said, I'm not satisfied with that as a permanent solution and am still hoping for a resolution that doesn't incur the extra server load.

January 29, 2013 at 4:49 am #100033

Harshad
Forum moderator

Dear Breanne,

For testing can you please replicate the issue on your localhost and check if it works on your local install?

Viewing 15 posts - 1 through 15 (of 21 total)

The topic ‘[Closed] (Yet Another) 404 Error’ is closed to new replies.