Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client is experiencing a 404 error when trying to access the translated version of the /map/ page on their website. Additionally, they are unable to find specific strings for translation on the homepage and member map block.
Solution:
To address the 404 error, we recommended checking if the page is not in draft status and ensuring that the translation process was followed correctly. For locating and translating the missing strings, we advised the following steps:
1. Navigate to WPML → String Translation.
2. Enable the option 'Look for strings while pages are rendered.'
3. Visit the page where the untranslated strings are displayed.
4. Return to WPML → String Translation and check if the string is registered.
5. If found, proceed to translate the string.
For more detailed guidance, visit https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/
If these steps do not resolve the issues, we recommend opening a new support ticket. It's also advisable to check related known issues at https://wpml.org/known-issues/, verify the version of the permanent fix, and confirm that you have installed the latest versions of themes and plugins.
If further assistance is needed, please contact us through the WPML support forum at https://wpml.org/forums/forum/english-support/.

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.

Tagged: 

This topic contains 10 replies, has 0 voices.

Last updated by Andrey 7 months, 1 week ago.

Assisted by: Andrey.

Author Posts
October 31, 2024 at 3:45 pm #16352610

gregM-13

Background of the issue:
I'm trying to translate the new /map/ page on my site hidden link to all required languages using WPML.

Symptoms:
When I view the translated /map/ page in another language, I get a 404 error (e.g. hidden link). I also can't find the strings to translate 'Not your closest help centre? Find it on the map' on the homepage or 'Please note: you will need to accept cookies to see and use our map.' on the member map block.

Questions:
How can I resolve the 404 error when accessing the translated /map/ page?
Where can I find the strings to translate the specific phrases on the homepage and member map block?

October 31, 2024 at 10:36 pm #16353514

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

Could you please provide screenshots showing how you translated the page? Additionally, can you share how you created this page?

Please make sure that the page is not in draft status.

Regarding your other question, have you tried to locate the strings by following these steps?

1. Go to WPML → String Translation.
2. Enable the option "Look for strings while pages are rendered."
3. Visit the page where the untranslated strings are displayed.
4. Return to WPML → String Translation and check if the string is registered.
5. If it is, you can proceed to translate the string.

https://wpml.org/documentation/getting-started-guide/string-translation/finding-strings-that-dont-appear-on-the-string-translation-page/

If you are still unable to find the strings, could you please open a new ticket for this issue? This will also assist other users facing similar problems in finding solutions when they search the forum.

November 1, 2024 at 9:48 am #16354462

gregM-13

Hi Andrey, thanks for your reply.

On the first point, the /map/ page is published, and was created in WordPress within Pages in Gutenberg. The page itself doesn't feature any text, but has a block and a summary, which has been translated.

To translate this page, I went to WPML > Translation Management.
In "Select Items for translation", I found and selected the map page only
In "Select translation options" I chose all available languages to translate, then chose "Translate automatically".

I can see the translations are there in the Page menu, and I can edit them, but when I go to the expected page URL, e.g. hidden link, I get page not found.

I will reply separately on the string translation issue.

Thanks!

Screenshot 2024-11-01 at 09.42.42.png
Screenshot 2024-11-01 at 09.47.27.png
Screenshot 2024-11-01 at 09.47.43.png
November 1, 2024 at 1:33 pm #16355015

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

I've also encountered a "page not found" error. I noticed that the translations for your page are currently under review.

Could you please try the following steps?

1. Go to WPML → Translations.
2. Select the page and choose "Approve" from the dropdown menu.

https://wpml.org/documentation/automatic-translation/how-to-review-automatic-translations-on-your-site/#approving-and-canceling-multiple-translation-reviews-at-once

November 1, 2024 at 5:49 pm #16355800

gregM-13

Hi Andrey, thanks for this.

Unfortunately, when I go to the WPML > Translations page, the translations queue doesn't load (please see screenshot), so I can't approve them that way.

Screenshot 2024-11-01 at 17.00.09.png
November 4, 2024 at 11:48 am #16360660

gregM-13

When viewing errors in the console, I see the following two issues:

GET hidden link net::ERR_ABORTED 404 (Not Found)

TypeError: Failed to construct 'URL': Invalid URL
at app.js?ver=4.6.13:601:357476
at K_ (app.js?ver=4.6.13:601:357554)
at Go (app.js?ver=4.6.13:571:57930)
at _s (app.js?ver=4.6.13:571:104169)
at cu (app.js?ver=4.6.13:571:96717)
at su (app.js?ver=4.6.13:571:96642)
at Zs (app.js?ver=4.6.13:571:93672)
at app.js?ver=4.6.13:571:45314
at t.unstable_runWithPriority (app.js?ver=4.6.13:579:3844)
at Wa (app.js?ver=4.6.13:571:45023)

November 4, 2024 at 4:24 pm #16362307

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

Please try the following:

1. Find a file wp-content/plugins/sitepress-multilingual-cms/dist/js/jobs/app.js and open it

2. This part

            var t = Wt("view_url", e);
            if (t) {
                var n = new URL(t);
                return n.searchParams.append("editFromReviewPage", 1),
                n.toString()
            }

change to

var t = Wt("view_url", e);
if (t) {
    try {
        // Decode the URL-encoded string
        var decodedUrl = decodeURIComponent(t);

        // Check if the URL already has query parameters, append `editFromReviewPage=1`
        var separator = decodedUrl.includes('?') ? '&' : '?';
        var updatedUrl = decodedUrl + separator + "editFromReviewPage=1";

        return updatedUrl;
    } catch (error) {
        console.error("Failed to decode URL:", error);
        return null; // Handle the error if decoding fails
    }
}

3. Save it.

Does this solve the problem with WPML → Translations page?

If this is still the issue, please check if there is no fatal error in the debug.log file.

To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

define('WP_DEBUG', true);

To enable the error logging to a file on the server, you need to add yet one more similar line:

define( 'WP_DEBUG_LOG', true );

The errors will be saved to a debug.log log file inside the /wp-content/directory.

https://wpml.org/documentation/support/debugging-wpml/

Let me know how it goes. Please remember to back up your database before proceeding with any changes.

November 5, 2024 at 4:24 pm #16368120

gregM-13

Thanks for your help so far Andrey.

I have made the change to the app.js file but no change to the Translations admin page.

I'm receiving the same error message, would we expect the app version to have increased - is it somehow still using the same cached version? app.js?ver=4.6.13

TypeError: Failed to construct 'URL': Invalid URL
at app.js?ver=4.6.13:601:357476
at K_ (app.js?ver=4.6.13:601:357554)
at Go (app.js?ver=4.6.13:571:57930)
at _s (app.js?ver=4.6.13:571:104169)
at cu (app.js?ver=4.6.13:571:96717)
at su (app.js?ver=4.6.13:571:96642)
at Zs (app.js?ver=4.6.13:571:93672)
at app.js?ver=4.6.13:571:45314
at app.js?ver=4.6.13:579:3844
at Wa (app.js?ver=4.6.13:571:45023)

November 5, 2024 at 5:01 pm #16368415

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Ah, the file is compressed. Let me share the file with you with the changes. You will find it in the private reply below.

November 7, 2024 at 12:06 pm #16376933

gregM-13

Hi Andrey,

The code you supplied has fixed the issue with the Translations page.

However, there is another issue with translations - having translated pages, they aren't accessible on the site, even though they are editable.

An example is a new page we have created
hidden link

Which has been translated into all other languages successfully, but isn't displaying on the site.

The French page is showing on the Translations page as status: "Completed" but when visiting the page, it 404s
hidden link

Are we doing something wrong in this process?

Thanks
Greg

Screenshot 2024-11-07 at 11.58.28.png
Screenshot 2024-11-07 at 11.58.10.png
November 7, 2024 at 1:21 pm #16377595

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback, Greg.

So, basically, we are returning the original issue that was reported. Is this occurring on a specific page, right? Or will the problem be the same if you create another new test page?

The process for translating pages appears to be correct.

Does the same issue occur if you temporarily turn off all plugins except WPML?

November 12, 2024 at 9:05 am #16391546

gregM-13

Hi Andrey,
Thanks for your suggestion - I have switched off a number of less important plugins and the issue has resolved.
I will investigate which plugin is causing the issue, but I believe this ticket can now be closed.
Best regards,
Greg

November 12, 2024 at 11:10 am #16392277

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback, Greg. I am glad to hear that you found the reason for the problem. Have a nice day!