Skip Navigation

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 29 replies, has 3 voices.

Last updated by Dražen 12 months ago.

Assisted by: Osama Mersal.

Author Posts
March 30, 2024 at 3:54 pm #15466395

ryoY-2

The URLs of already published pages are being automatically rewritten to the format "?page_id=" after introducing WPML.

I have reviewed the following page: https://wpml.org/forums/topic/replace-page_id-in-the-urls/

However, the relevant pages are already published (both the page containing the URL and the linked page). Therefore, I do not believe the information on the above page applies to my situation.

Additionally, I have deleted all drafts just to be sure.

Apart from the above, what else could potentially be causing this issue?

(This is an automatic translation from Japanese.)

March 31, 2024 at 2:26 pm #15467380

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for contacting WPML forums support. I'll be glad to help you today.

Please share a problematic page URL to check it. Also, I would need to look closely at your site, so I would need to request temporary access (WP-Admin and FTP)
Preferably to a test site where the problem has been replicated.

Your answer will be private, meaning only you and I can access it.

❌ Please backup your database and website ❌

✙ I need your permission to deactivate and reactivate the plugins and themes and change site configurations. This is also why the backup is critical.

✙ I also need your permission to take a local copy of your site to debug the issue without affecting your live site.

Best regards,
Osama

April 1, 2024 at 10:02 am #15468661

ryoY-2

I have prepared the FTP account.
How should I convey this information?

April 1, 2024 at 1:11 pm #15469289

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for the access details. I checked the JA post and found that its link is added by the page ID. (Kindly check the attached screenshot)

Please change the link to the post URL and check the issue. (hidden link)

Best regards,
Osama

1.jpg
April 1, 2024 at 1:44 pm #15469477

ryoY-2

Hello, Hello.
What do you think is the issue that I'm struggling with?
Could you please try writing it in your own words?

April 1, 2024 at 1:50 pm #15469535

ryoY-2

And,

Could you please rewrite the link by yourself and show me the result?

April 1, 2024 at 2:00 pm #15469583

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

The issue is that in the default language post, you used the ID URL to link the pages, so when you translated the page, it used the same URL. (Kindly check this hidden link)

In order to fix the issue, you need to change the URL in the default language and update the translation to update the URL in the translated post. (Kindly check this hidden link)

I changed the URL to the default language; please check if it works correctly. (hidden link)

I also noticed that you use the WordPress editor to translate your posts. I suggest you try the WPML editor for one post and check if you will face the same issue. Kindly check this guide to learn more about translating URLs in the WPML editor. (https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/)

Best regards,
Osama

April 2, 2024 at 10:30 am #15472068

ryoY-2

Osama-san,

Thank you for your response.

However, I find that many of your answers are difficult for me to replicate.

I hope to receive responses from you for each of the items listed below.

1)

You may have misunderstood my question.
If you read my text without preconceptions, there should be no room for misunderstanding.

I did not change the URL of the original language post to a page-ID. This was done by WPML.

I initially installed WPML in March 2018.
However, I only used it for one year and did not update it. (The plugin remained installed with the version from that time.)

The URLs linked on the Ja and En pages have been there since then and have been working perfectly fine.

I purchased and installed the latest version again in February this year.
Then, when I edited the Ja and En pages (without editing the URLs that had changed), and saved, the link URLs had been replaced with page-ID links.

Since I did not make these edits myself, it took me some time to notice that they weren't working.

I was greatly surprised by the behavior of being replaced with edits I hadn't made.
Therefore, I am asking why this happened, from the beginning.

If you had read the question normally and correctly, you should have understood.

2)

Currently, the Ja page in the original language remains as URL links.
However, when I edit the En page that you said you fixed, it changes back to page-ID links again.
And then, I can't revert it no matter what I do.

3)

When trying to edit and save the page, an error occurs.
-----
Warning: preg_match(): Unknown modifier '-' in /home/path3/iricosky.net/public_html/wp/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 186
-----
This error occurs numerous times.
It appears in a blank browser screen, not within the WordPress editing interface.

I'll provide further details in an "additional".

3-2)

You haven't mentioned this error, but have you encountered it?

4)

When trying to edit the En page, it indicates that it's currently being translated.
(This has been displayed since I first opened it after you edited it.)
I don't need a translation of this page. How can I stop this translation?
Also, by "translation," do you mean from Ja to En?

5)

I've captured screen in video for points 1-4.
How should I send you the URL of the video for your confirmation?

Additional:

I encountered this error in another scenario and once asked support about it.
It occurred when importing posts.
You can see the entire exchange here.
https://wpml.org/forums/topic/error-when-importing-from-wordpress/

Because the support was very poor at that time, I closed the conversation with her.

Afterward, Mr. Marcel T. explained that it was due to a conflict with XML Sitemap Generator for Google, but I didn't have time to confirm.

However, even after uninstalling XML Sitemap Generator for Google, this error occurred, so I doubt if it was really as described.
I ask again, did this not occur in your environment?

Additional 2:

Although I haven't received an answer,

There's a warning saying "WPML plugin cannot connect to wpml.org."
*
What could be the reason for this? How can I resolve it?

April 2, 2024 at 10:33 am #15472077

ryoY-2

I enabled the WordPress editor because I encountered errors like this while using the WPML editor, and I thought that changing the editor might help avoid the errors. I enabled the WordPress editor just before asking the question.

April 2, 2024 at 3:31 pm #15473944

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

1) Thanks for your reply. Updating WPML from a very old version to the latest version could cause some issues, but it can't change the strings in the default language, which, in your case, is the JA.

2) I updated the English page. Would you please confirm that you see the correct URL? (hidden link)

3) Yes, I saw this error, and after some tests, I noticed that the "WPML Sticky Links" caused it, so I deactivated it.

4) If you mean the warning in this screenshot, you can cancel it. (Kindly check this hidden link)

5) We try to keep one issue per ticket in our forum, so may I kindly ask you to open a new ticket for the import issue?

Continuing with one ticket per issue helps supporters focus on one issue at once and enables other users to find solutions to their questions faster.

6) For the warning (WPML plugin cannot connect to wpml.org.), please try the following steps:
1- Go to Plugins-> Add New-> Commercial tab (hidden link)
2- Click "Unregister WPML from this site"
3- Go to your WPML account-> Sites (https://wpml.org/account/sites/)
4- Delete the site key for this site
5- Go to Plugins-> Add New-> Commercial tab
6- Register a new key for the site (https://wpml.org/faq/install-wpml/#register)
7- After registering the site, check the warning

8) Using more than one editor to translate your content is not recommended, so please stick to one editor and use it to translate your content.

7) In order to send a video, please upload it to any file transfer service and share the link with us.

Best regards,
Osama

April 3, 2024 at 5:21 am #15475974

ryoY-2

Osama-san,

1)
So, what you're saying is that while there's a possibility of trouble, WPML wouldn't autonomously rewrite strings in the default language.
In other words, it's not WPML's fault that the page ID got rewritten.
I wish you had told me that from the beginning.

2)
Yes, that's correct.

3)
By turning off WPML Sticky Links, I was able to rewrite the links correctly. However, when I turn it back on, it only allows me to change the page ID.

3-2)
When you initially informed me that you were able to rewrite the destination strings, were you already aware that WPML Sticky Links had been deactivated? Why didn't you communicate this to me?

I repeatedly tried with WPML Sticky Links activated and informed you that I couldn't achieve the desired outcome.

If WPML Sticky Links is causing adverse effects, it doesn't make sense for it to remain activated for successful outcomes.

Yet, you merely seemed puzzled. Why didn't you inform me?

3-3)
You're saying that if we deactivate WPML Sticky Links, the issue won't occur. So, essentially, WPML Sticky Links is the cause of the problem, right?

Also, even if I can rewrite the URL to normal once, if I activate it again, it may change to the page ID.
Doesn't this contradict what was written in 1)?

Or are you telling me not to use WPML Sticky Links in my environment?

4)
Yes, that's the dialogue. I know how to make it stop appearing in the future.
I'm not asking how to get rid of that dialogue; I want to know the background of why it's appearing.

5)
(Regarding the new ticket)
Did I mention anywhere that it was necessary?

6)
For the warning (WPML plugin cannot connect to wpml.org.),
Could you please tell me why it's showing up?
Was there a mistake in the registration process?

April 3, 2024 at 2:11 pm #15478959

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

Thanks for your reply.

3) When I first noticed the issue, I refreshed the page, and the update was made. When you mentioned it, I debugged it further to find that deactivating WPML sticky links fixes the issue, so I told you about it.

Please keep it deactivated and check if everything will work correctly.

4) This dialogue appears because you edited a translated post/page using the WordPress editor while you initially translated it using the WPML editor.

5) I'm afraid I don't understand your reply at this point.

6) When I checked the "Refresh license data to recognise license update" in WPML-> Support-> Troubleshooting, I got a site key error, so I asked you to re-register the site.

Best regards,
Osama

April 3, 2024 at 11:21 pm #15480676

ryoY-2

Osama-san,

It's possible that I may not fully understand your English, or there could be inaccuracies in my translations.

Therefore, let me succinctly outline what I'm unable to comprehend:

The clear distinctions between what you're saying and my experiences can be organized as follows:

All of the following occur in my experience when WPML sticky links are activated:

Generates error screens.
Does not update URL links.
Arbitrarily changes URL links to page IDs.
Hence, I am inclined to think that these errors are all due to WPML sticky links.

However, you mention that 2 and 3 don't occur. This is where I am unable to understand.

Perhaps you are suggesting to raise a separate support ticket for the error screens seemingly caused by WPML sticky links. However, given that 1-3 occur simultaneously, these are not separate issue.

It has been determined that the essence of my support request, titled "The string of the link URL is automatically rewritten," is to rectify the potential errors associated with WPML sticky links. That is my current understanding.

Your statement, "Please keep it deactivated and check if everything will work correctly," sounds to me like words limiting the functionalities that should be provided to me, essentially abandoning support.

April 4, 2024 at 9:09 am #15481772

Osama Mersal
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+02:00)

Hi,

The change of URLs to IDs is how the Sticky Links plugin works. Please check this guide. (https://wpml.org/documentation/getting-started-guide/sticky-links/)

So when you change the IDs to a normal URL, the plugin changes it back to ID.

The generating errors issue could be a conflict issue, so please check if the issue persists in a minimal environment by following these steps:

1- Deactivate all the plugins except WPML CMS, String Translation, and Sticky Links.
2- Switch to a WordPress default theme like Twenty Twenty-one.
3- Update a page and check if you will see the same error page.

If the issue is gone, activate them one by one to see which one is causing an interaction issue.

❌ Please backup your database before performing the above test ❌

Best regards,
Osama

April 4, 2024 at 12:49 pm #15483148

ryoY-2

Osama-san,

I see.
It appears I installed WPML Sticky Links without knowing its functionality at all to begin with.

You were, of course, providing support to me fully aware of the functionality of this plugin, weren't you?

On the other hand, simply installing this plugin wouldn't automatically change the links included in the default language posts to page-ID links, right?

In your reply At APRIL 2, 2024 AT 3:31 PM
"but it can't change the strings in the default language, which, in your case, is the JA."

Furthermore, as long as this plugin is enabled, translated language posts will indeed change to page-ID links, won't they? That's because it's the purpose of this plugin's existence.