Skip Navigation

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

Problem:
Warning: preg_match(): Unknown modifier '-' in /home/foo/bar.com/public_html/wp/wp-content/plugins/sitepress-multilingual-cms/inc/absolute-links/absolute-links.class.php on line 186 when importing posts from wordpress and with Google sitemap xml plugin activated

Solution:
https://wpml.org/errata/php-warning-preg_match-unknown-modifier/

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 16 replies, has 2 voices.

Last updated by Paola Mendiburu 1 year ago.

Assisted by: Paola Mendiburu.

Author Posts
March 7, 2024 at 10:24 am

ryoY-2

Error when importing from WordPress

March 7, 2024 at 10:53 am
March 7, 2024 at 10:56 am #15383670

Paola Mendiburu
Supporter

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

Timezone: Europe/Madrid (GMT+02:00)

Please let me know if you were able to reproduce the issue.

March 7, 2024 at 11:03 am #15383791

ryoY-2

I repeated the same thing again as you did and no error appeared.
It seems to be the case if the Post already exists.

When moving these POSTs to the Trash, I got the same error.

The next time I completely deleted the posts from the Trash and Imported them again, the error reproduced.

I have emptied the relevant category again, so please try Import.
Note that the imported post will be in the category "イリコスキー製麺所 所長のBLOG" category ID=57.

March 7, 2024 at 1:10 pm #15384521

ryoY-2

I have created and tested other test sites.

What you have just seen is,
WP-A(Not WPML) -> Export
WP-B(With WPML) -> Impoert
This was the situation where I got the error.

Now,
I disabled WPML in WP-B and imported the same file, and the error did not occur.

Further,
In a situation where WPML was installed on both WP-A and WP-B
I exported from WP-A.
When I imported it into WP-B, I got the same warning.

March 7, 2024 at 3:18 pm #15385216

Paola Mendiburu
Supporter

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

Timezone: Europe/Madrid (GMT+02:00)

Do you have WP installed on WP-A?

March 7, 2024 at 3:39 pm #15385454

ryoY-2

Yes, of course I have, but how can I tell you?
(Is this a page that others can't see?)

March 11, 2024 at 8:44 am #15393503

Paola Mendiburu
Supporter

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

Timezone: Europe/Madrid (GMT+02:00)

Sorry I mean WPML.

So I see that WPML is not installed on the first wp.

What error are you getting?

March 11, 2024 at 8:49 am #15393546

ryoY-2

Please read the reply of MARCH 7, 2024 AT 1:10 PM.

Everything you asked is in there.

March 11, 2024 at 9:18 am #15393721

Paola Mendiburu
Supporter

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

Timezone: Europe/Madrid (GMT+02:00)

I have done the import and see the error:
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

Even if the error appears does the import works correctly?

Please try two thing:
- change php version
- deactivate all the plugins and leave only the WPML ones to see if there is a conflict with a plugin

Please let me know what you find.

March 11, 2024 at 9:35 am #15393906

ryoY-2

> I have done the import and see the error:.

From the beginning, it says that I get that error.

> Even if the error appears does the import works correctly?

The import is complete. The post also appears.
But when I move it to the trash, I get the same error.
I wrote this also on the first day.

> - deactivate all the plugins and leave only the WPML ones to see if there is a conflict with a plugin

Why is this the kind of answer after 4 days?
Why did you not respond on Friday,?

March 11, 2024 at 10:25 am #15394137

ryoY-2

Are you the one who installed WP File Manager?

March 11, 2024 at 5:47 pm #15396881

Paola Mendiburu
Supporter

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

Timezone: Europe/Madrid (GMT+02:00)

Yes, you can delete it.

I will try to reproduce the issue exporting posts from a wordpress without WPML and importing to a wordpress with WPML.

March 12, 2024 at 5:05 am #15397700

ryoY-2

> I will try to reproduce the issue exporting posts from a wordpress without WPML and importing to a wordpress with WPML.

So what was the result?
Please report the results.

> Yes, you can delete it.

If you installed it, uninstall it yourself.

But I can't think of a situation where you would need WP File Manager for that purpose, how did you use it?

Finally:
Can a WPML supporter install a plugin without my consent?

March 12, 2024 at 5:09 am #15397702

ryoY-2

You tell me to disable all other plugins and try it,
when I am trying it,
You installed other plugins without my knowledge.

Don't you think your actions are wrong?