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 thread is resolved. Here is a description of the problem and solution.

Problem:

wyz_business_country field is not being copied to the translation and therefore when searching by location it does not work.

Solution:

Workaround - Translate the business posts manually and set the location field for each translation.

Tagged: 

This topic contains 25 replies, has 2 voices.

Last updated by Itamar 5 months, 1 week ago.

Assigned support staff: Itamar.

Author Posts
March 14, 2019 at 7:39 pm #3348231

ahmedM-19

Hello Itamar,
Hope you're doing well.

I need your help to solve this problem
Try to search for any business in the English version by any location or category hidden link it works.
while if you try to search in the translated Arabic version hidden link it didn't work

Waiting for your feedback
Thank you

March 14, 2019 at 7:41 pm #3348237

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

In our forum, we try to keep one issue per ticket.
Continuing with one ticket per issue helps not only supporters to focus on one issue at once, but also enables other users to find solutions to their questions faster. Therefore, I've split the other ticket and created a new ticket with this issue.

When I try to search in the Arabic URL I can find a product. Please see the attached screenshot. But I'm not sure that I search correctly.
How do you try that?
Can you explain it to me, please?

Thanks,
Itamar.

March 16, 2019 at 10:09 am #3359673

ahmedM-19

Hello Itamar,

Try to search in English version by location (choose Alexandria) and by category (choose restaurant&cafe) and with the same search queries in Arabic version by location (choose الاسكندرية) and by category (choose مطاعم وكافيهات)

Search results in English
hidden link
screenshot: Business_search_english.png

Search results in Arabic
hidden link
screenshot: Business_search_arabic.png

Waiting for your feedback.
Thank you.

March 18, 2019 at 5:08 pm #3371749

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I can see the issue on your site.
Can you please tell me what enables the search option?
Is it built-in your theme or is it a plugin that you are using.

Could you please share your Debug information with me?
You can read the detailed explanation about it here.
http://wpml.org/faq/provide-debug-information-faster-support
The debug info will give me a lot of information about how your site is configured and will help me understand the source of the problem.

Thanks,
Itamar.

March 18, 2019 at 7:33 pm #3372719

ahmedM-19

Hi..

Search option built-in the theme.
I paste the debug information.

Thanks,
Dodd

March 19, 2019 at 5:31 pm #3382003

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, Dodd.

Please try the following.
1. Go to WPML -> Languages -> Language filtering for AJAX operations.
2. Select the option 'Store a language cookie to support language filtering for AJAX'
3. Press the save button.
4. Check if now you can search in the Arabic business page.

If this option does not work, then we need to replicate this issue on a clean WordPress installation. Then our compatibility team will check if they can find a fix for that. And if they cannot find a fix for that, then the cooperation of the theme's developers would be needed.

I created a test website with a clean WordPress install. You can access it through this link:
hidden link
Through this link, you will be automatically logged in. (If nobody logs in the test site will be available for one week from today.)
Could you please install the WYZI Business Finder theme and its add-ons and see if the issue is replicable on a clean WordPress installation?
Please configures WPML as it is configured on your site.
Please also make sure that you are installing the latest version of the theme and add-ons.

Thanks,
Itamar.

March 24, 2019 at 10:28 am #3448095

ahmedM-19

I still need assistance.

Problem is still present in the translated version only.
The search bar didn't work in the Arabic,

Waiting for your support
Thanks

March 24, 2019 at 9:39 pm #3449137

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Sorry if I was not clear enough. Does the problem also happen on the test site?
I can that you installed your theme on the test site. But WPML is not configured there, and the site is only in English. Can you please configure WPML as it is configured on your site and add some Arabic content and see if the problem also happens on the test site?

Thanks,
Itamar.

March 25, 2019 at 9:02 am #3450549

ahmedM-19

Hi ,
It is not related to the theme or word press, its about WPML.
The search is working in the English version.

Search results in English
hidden link
screenshot: Business_search_english.png

Search results in Arabic
hidden link
screenshot: Business_search_arabic.png

Waiting for your feedback.
Thank you.

March 26, 2019 at 10:52 am #3461645

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

On the test site that the search in Arabic works. Here is what I did to check that.
1. I translated two posts from the 'Business' CPT into Arabic.
2. I translated the Business Listing page (where the search option is available).
3. I've searched for a key work from my translations.
4. I could see that it works. Please see the attached screenshot.
Please try it your self on the test site and see that it works.

There must be some misconfiguration that is causing this issue on your site. For this, please let me have access to your site so I'll be able to check things.

If you need further help with this, please share the access details to your site with me.
I'm enabling a private message for the next reply.

Privacy and Security Policy

We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/

**IMPORTANT**

- - Please make a backup of site files and database before providing us access. --

Thanks,
Itamar.

March 27, 2019 at 2:57 pm #3472207

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi and thanks for the access details.

I've checked many things on your site and compared it to the test site, and I've found out that the issue is with filtering the businesses by location. Because if you only try to filter by category, it is working. Do you agree with me on this?

Please confirm the following process.
1. The location is being created in the 'Location' admin menu. Please see the attached screenshot location.jpg.

2. After that, you translate the 'Location' into Arabic.

3. Then when creating a business, you need to select this location in the 'Location' field. Please see the attached screenshot location-field.jpg

4. And those locations are available in the 'Location' search filtering option. Please see the attached screenshot location-filter.jpg

Currently, the only way that I've found that enables the location filter to work is to manually edit the Arabic business (with the WordPress editor and not with WPML's Translation Editor) and manually selecting the correct Arabic location. Please see the attached screenshot arabic-locations.jpg.

Please let me know if it is a good workaround for you?

Regards,
Itamar.

March 29, 2019 at 3:48 pm #3492697

ahmedM-19

Hello Itamar,
Thank you so much for your professional response.

I followed your steps to solve this error as you see in the attached screenshots but it didn't work.
Please tell what did I do wrong and what shall I do now.
Thank you.

March 30, 2019 at 11:48 am #3498171

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Yes, there is one more thing that needs to be done. I'm sorry that I forgot to mention it.
You need to set the wyz_business_country custom field to 'Translate'. You do it by scrolling down to the Multilingual Content Setup section on the editing page. Then you need to select 'Translate' for the wyz_business_country field and press the 'Apply' button. Then you need to update the page. And go to the translation and select the correct location. If the filed is not set to 'Translate' then it will not work. Please see the attached screenshot wyz_business_country.jpg. You can also do that in WPML -> Settings -> Custom Fields Translation. I've already done it on your site.

Now, I've checked if it is working with this business.
hidden link
I've set for it the correct location on the Arabic editing page (I hope it is the correct location). Please see the attached screenshot correct-location.jpg. Then on the search page, I've set the location to أسيوط. And the business is found.
Please see the attached screenshot search-ok.jpg

Please let me know if now it is working for you.

Regards,
Itamar.

الإسكندرية

March 30, 2019 at 11:43 pm #3499449

ahmedM-19

Hi Itamar,

Thank you so much.
It works but it will take a lot of time to insert logo and location in more than 7000 businesses.
Do you have any other option to save time!

Thank you

April 1, 2019 at 11:55 am #3507551

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

I've checked things on the sandbox site and found out that you can copy the location and logo image (featured image of the business) in the following way.

1. Set the following fields to 'Copy' and press the 'Apply' button.
wyz_business_logo_id
wyz_business_logo
wyz_business_logo_bg
wyz_business_country
Please see the attached screenshot wyz_fields-copy.jpg
You will only need to do it once. It is also possible to do it in WPML -> Settings -> Custom Fields Translations.

2. Update the original business.

3. Duplicate the business (with WPML's duplicate option) to the second language.

4. Go to edit the second language.

5. Press the 'Translate independently' option.

6. Translate the business into the second language and publish.

Now the log (featured image) and the location would show on the transacted business. You can see it here on the test site (a business translated from English into French.)
hidden link
You can see that the correct translation is showing and the logo image is also copied.
Please see the attached screenshot fr-busi.jpg

This method is good for new untranslated businesses. If your business is already translated then the translation will get overwritten, and you would need to retranslate the business.

Please let me know if this method is good for you.

Regards,
Itamar.