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.

Author Posts
March 20, 2019 at 12:33 pm #3388281

pauloJ-2

I am trying to: migrate a large site designed with qTranslate-X (and which includes a Woocommerce online store) into WPML.

Link to a page where the issue can be seen: hidden link (note that this is a test site that I set up before I attempt it in the real production site).

I expected to see:

First I disabled Shopmagic, which was at the root of the problems in my previous support ticket (https://wpml.org/forums/topic/after-importing-from-qtranslate-x-wp-admin-doesnt-work-anymore/)

Then I installed: WPML, Woocommerce multilingual, WPML String Translation and WPML Translation Management, and also Gravity Forms multilingual.

Then I installed the qTranslate-X importer.

Then I followed the workaround listed in https://wpml.org/forums/topic/cant-remove-qtranslate-x/

Then I deactivated qTranslate-X and activated all the WPML plugins listed above.

Then I ran the importer...

Instead, I got:

And the importer shows the following message:

Copying settings to WPML.
Importing terms.
Fixing terms: batch #1.
Finished import batch #1. Imported 10 terms.
Preparing next batch.
****************************************

And gets stuck.

The WordPress debug logs say the following:

[20-Mar-2019 12:23:28 UTC] PHP Notice:  Use of undefined constant THIM_URI - assumed 'THIM_URI' in /home/caminotrym/www_test/web/wp-content/plugins/thim-hotel-wp-shortcodes/functions.php on line 74
[20-Mar-2019 12:23:28 UTC] PHP Warning:  Missing argument 3 for SitePress::create_term(), called in /home/caminotrym/www_test/web/wp-includes/class-wp-hook.php on line 288 and defined in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2444
[20-Mar-2019 12:23:28 UTC] PHP Notice:  Undefined variable: taxonomy in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2446
[20-Mar-2019 12:23:28 UTC] PHP Warning:  Missing argument 3 for SitePress::create_term(), called in /home/caminotrym/www_test/web/wp-includes/class-wp-hook.php on line 288 and defined in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2444
[20-Mar-2019 12:23:28 UTC] PHP Notice:  Undefined variable: taxonomy in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2446
[20-Mar-2019 12:23:29 UTC] PHP Warning:  Missing argument 3 for SitePress::create_term(), called in /home/caminotrym/www_test/web/wp-includes/class-wp-hook.php on line 288 and defined in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2444
[20-Mar-2019 12:23:29 UTC] PHP Notice:  Undefined variable: taxonomy in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2446
[20-Mar-2019 12:23:29 UTC] PHP Warning:  Missing argument 3 for SitePress::create_term(), called in /home/caminotrym/www_test/web/wp-includes/class-wp-hook.php on line 288 and defined in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2444
[20-Mar-2019 12:23:29 UTC] PHP Notice:  Undefined variable: taxonomy in /home/caminotrym/www_test/web/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 2446
[20-Mar-2019 12:23:31 UTC] PHP Warning:  array_key_exists() expects parameter 2 to be array, null given in /home/caminotrym/www_test/web/wp-content/plugins/wpml-translation-management/classes/ATE/class-wpml-tm-ate.php on line 14
March 22, 2019 at 4:25 am #3437445

Yvette
Supporter

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

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

Hello

It seems like this problem might be data related. I am regretably not familiar with the qTranslate import process, but if the first batch was successful then it would imply that the actual setup is ok.

The notices in the log are warnings but do not provide too many clues. They might be related to the language codes on the source system vs. the target system.

Are all the terms/taxonomies that you are importing "translated"?
There is a known issue with data that is not translated

I wait for your response. If there is any way to isolate the case that is failing, this would go a long way to helping us help you figure out what is wrong.

March 22, 2019 at 9:14 am #3438813

pauloJ-2

Hello:

Just to clarify, when I talk about the qTranslate importer, I mean this plugin developed by you guys:

https://wpml.org/documentation/related-projects/qtranslate-importer/

I'm not talking about any 3rd party plugin.

As for taxonomies, we are not using any custom taxonomies, only the default "categories" and "tags" ones, and yes, they are translated using qTranslate-X. Still, the vast majority of the site's content is in pages (not blog entries), which don't use taxonomies.

In my previous support ticket (https://wpml.org/forums/topic/after-importing-from-qtranslate-x-wp-admin-doesnt-work-anymore/) I mentioned that I had managed to import my site successfully, using this same setup. The only difference is that the other time I didn't install Woocommerce multilingual, and this time I'm trying to import all the data at once (both the site's contents and Woocommerce). Please see https://wpml.org/forums/topic/after-importing-from-qtranslate-x-wp-admin-doesnt-work-anymore/#post-3245067 for reference.

I'll try migrating the site again, without installing Woocommerce first, and see what happens.

March 22, 2019 at 3:10 pm #3441669

Yvette
Supporter

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

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

Yes, I understand that you are using a bridge plugin written by us.

Just to clarify, as with many import processes, there is first the mechanism that is required to import (e.g. the "setup/configuration") and then there is the data.

If you can isolate the kind of data that is failing, this can help in troublshooting what might be going wrong.

e.g. is it failing on taxonomies, on posts, on products, on untranslated products, on variable products, on variants.....etc.

To "manage" the challenge, I would recommend breaking the process into pieces that are similar so that you can identify what is being imported when it fails and then we can isolate a sample case to work our the problem.

March 27, 2019 at 5:43 pm #3474325

pauloJ-2

Hello:

Yes, as mentioned in my previous reply, when I didn't install the WPML Woocommerce multilingual plugin, the import process worked without problems, so the problem was obviously in translating the Woocommerce products. How would I translate them later? Do I have to do it by hand?

Also, another question: after the import process was finished, I logged into my site, and I found that the qTranslate importer had created new pages for the translations... but it had set all of them with "Spanish" (my default language) as their language. So now I have to go through all the pages, set their real language by hand and connect them to each other, also by hand. Is this normal behaviour? If the original qTranslate pages had information about the language of each translation, why couldn't the importer set the newly created pages with their proper languages?

March 27, 2019 at 8:59 pm #3475773

Yvette
Supporter

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

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

Hi

1. You wrote:" when I didn't install the WPML Woocommerce multilingual plugin, the import process worked without problems, so the problem was obviously in translating the Woocommerce products. How would I translate them later? Do I have to do it by hand?.."

Just to make sure I understand: The issue is in importing Woocommerce products that were *already existing* as translated Woocommerce products using qTranslate in the original system?

Questions:
1.1 What kind of products are being imported: simple, variable, composite, bundled...etc?
1.2 Do you have a sample import with a product type that fails?

2. You wrote: ".. I found that the qTranslate importer had created new pages for the translations... but it had set all of them with "Spanish.."

This does not sound normal. If new pages were created assigned to the default language, it is because it did not recognise the language information during the import process.

Questions:
2.1 Are we still talking about Woocommerce products? or is this regarding posts/pages?
2.2 when you previously said that the import "worked" without Woocommerce, did the same thing happen?

March 28, 2019 at 10:17 am #3479177

pauloJ-2

Okay, let’s start from the beginning.

I have a site localised with qTranslate-X in 4 languages (spanish, english, french and german). It has a Woocommerce store attached to it. The site is for a travel agency, so the products are different tours (and they are configured as variable products).
The site does have a plugin to integrate qTranslate and Woocommerce installed, but we are not taking advantage of it; in other words, there are 4 versions of each product, one for each language. The reason is that each product uses a Gravity Forms form to perform several calculations, depending on the options picked by the customer, and you can’t link to a different form depending on the language. So, in other words, qTranslate-X is activated in Woocommerce, but we just leave the language fields that don’t correspond to the language of each product blank.

Hopefully it will be clearer seeing the attached screenshots (which are all for the same product). As you can see, the "English" section in qTranslate-X is filled, while the others are blank. You can also see the Gravity Form attached.

As for the rest of the site, it has normal pages, localised and translated using qTranslate-X.

Anyway: when I installed WPML + the WPML Woocommerce multilingual plugin, the migration process gets stuck, as mentioned before. If I don’t install the Woocommerce multilingual plugin, the import process works perfectly, but what happens is:

-The normal posts and pages all have their language set as “Spanish” (the default language).
-The Woocommerce products also have their languages set as “Spanish”. Besides, they no longer are linked to the Gravity Form they had before.

So now I have to go and set all the posts and products’ languages by hand, one by one. It’s no dealbreaker, but it *is* an annoyance (specially considering that it’s a large site), and I’m worried about the other surprises that I might find as I keep revising the site.

March 28, 2019 at 5:46 pm #3484581

Yvette
Supporter

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

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

I truly appreciate you patience on this. It makes everything much clearer

1. To put some context on the support end, the qTranslate importer plugin development had stopped for several years and has only recently been restarted so the experience with it in our support team is not very deep.

You wrote:
"in other words, qTranslate-X is activated in Woocommerce, but we just leave the language fields that don’t correspond to the language of each product blank."

Would it be possible for you to prepare an import file with only 1 or 2 of these products as an example?

My guess is that the way the data is setup (blank language info) in your original site was not accounted for --or--it may be that the importer only works with certain types of products.

2. Next steps:
I will ping the developer of qTranslate-Importer directly with this case. Having worked with him before with other import problems, I know he will ask me to prepare a test case (which is why I ask if you can please prep a small import file that represents this issue).

I will then prepare a sandbox site that is empty and only having WPML and Woocommerce installed. We will then use qTranslate-importer to demonstrate the issue there and this is the case that the developer will work on directly.

Are these steps agreeable to you?

March 28, 2019 at 6:14 pm #3484819

pauloJ-2

Hello:

How would I create the import file for only a few products? Is there an option in Woocommerce or WordPress to export only a few posts/products?

I'm always open to help you guys improve the software, but my site is big and complex, and I don't know if an installation from scratch will be able to reproduce all the moving parts in it. Neverthless, I'm fine with that. I'd just like to know how to export the information you need.

March 28, 2019 at 7:16 pm #3485167

Yvette
Supporter

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

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

Hmm - the first thought tha comes to my head is to take a copy of your full CSV export and delete the entries that do no correspond to the test products.

This will then be the test import file.

Would that be possible?

April 1, 2019 at 10:47 am #3506525

pauloJ-2

Hello:

I have prepared a CSV with a couple of examples of each language: in other words, there are a couple of products in spanish, in english, in german and in french. I've also left in a couple of products that had text in two languages, probably due to user error (somebody started filling in the text in 4 languages for each product before realizing that this isn't how our site works).

Please note that, since some of the fields in the CSV are text descriptions, there are line breaks in them, so you'll have to take that into account when importing them. I've had success using LibreOffice.

Now the question is... how do I send you this CSV? I've tried attaching it to this post, but the board won't let me; it only lets me upload images.

April 2, 2019 at 2:38 am #3512879

Yvette
Supporter

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

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

Hello

Please upload the file(s) to a file-sharing platform like WeTransfer, Fileshare, Dropbox...etc. Then, in your next reply, please send a link where we can download it from the platform you used.

I´m opening the private area - you can include a link in the text or in the "Duplicator archive" area of the form that appears .

April 2, 2019 at 10:27 am #3516061

Yvette
Supporter

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

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

Hello

Thanks for your time and effort! I have been conversing with the developer of qTranslate Importer regarding your case.

With the objective to be as transparent as possible about the time to resolution ...the developer informs me that this plugin is not currently working with Woocommerce products. At best, it is working partially. People in the past (2015-2016) reported that it imports and then stops but it was never escalated to him until now with your case.

Given that the development of this plugin was interrupted and then resumed, I can see how this could have happened.

So, now that WPML has recommitted to developing the plugin, he would like to use your site to work on resolving the outstanding issues....but if you are pressed for time, it may be more relistic to manually resolve the linking yourself.

Finally, the developer ask me if you have a sql or backup of your site BEFORE the import. I told him that you prepped some import files of products which he can use as well but would ideally like a full system backup or at least a sql of your database previous to the import.

So, I wait for your news if this is possible to obtain and also your acknowledgement of what I have written with regards to your timing and estimated time to resolution.

April 2, 2019 at 3:23 pm #3518701

pauloJ-2

Hello:

I can provide you with a full copy of everything, both the site files and the SQL backup. However, I can also provide you with a live site. As explained in my first post, my real site is hidden link, and I've set up a site for testing, probando.caminotraveltours.com, which mirrors it.

Right now, probando.caminotraveltours.com has WPML installed and the contents migrated using your plugin, but I can also restore it to its original state and give you both FTP and /wp-admin/ access. Which would you prefer?

April 2, 2019 at 5:32 pm #3519529

Yvette
Supporter

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

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

I think the ideal would be:
probando.caminotraveltours.com restored to the pre-migrated state with FTP/wp-admin access.

From here, the developer can then grab the site copy or any other files that he needs.
I am opening the private area for this and I am prepping the ticket for escalation.

Thanks again!

The topic ‘[Closed] qTranslate-X importer gets stuck’ is closed to new replies.