This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is trying to make Search & Filter Pro work with a second language on their website. The filters should capture values from an ACF field, which are translated using WPML String Translation. However, the filters do not recognize the translated values.
Solution:
We have investigated the issue and our 2nd Tier Support has provided feedback. The problem arises because while labels can be translated using ACFML filters when calling ACF functions on the front end, the translated values, which are part of post meta, cannot be translated on the front end. Manually adding translated values in the code of the Search and Filter Pro plugin is not recommended, as these values may change upon post translation, leading to mismatches.
We recommend keeping the values common across all languages and translating only the labels. You can set up your ACF fields with a value:label pair and then translate the labels, keeping the values the same. For example:
all : 전체<br />domestic : 국내<br />intl : 국외
This approach ensures that the values remain consistent while the labels are displayed in the correct language to the user.
Please note that this solution might be irrelevant if it's outdated or not applicable to your case. We highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the issue persists, please open a new support ticket with us.
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: Custom Work
Author | Posts |
---|---|
January 9, 2024 at 1:25 pm #15164679 | |
eun-kwangH |
Tell us what you are trying to do? Is there any documentation that you are following? Is there a similar example that we can see? What is the link to your site? |
January 9, 2024 at 2:25 pm #15165170 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Hi there, Thanks for contacting WPML support. I've checked your Website here hidden link and I'm able to see the issue you had there. I will need to closely examine your website. Therefore, I will require temporary access (WP-Admin and FTP) to a test site where the problem has been replicated, if possible. This will enable me to provide better assistance and determine if any configurations need to be modified. Please note that it is important to have a backup for security purposes and to prevent any potential data loss. You can use the UpdraftPlus plugin (https://wordpress.org/plugins/updraftplus/) to fulfill your backup requirements. Your upcoming reply will be treated with confidentiality and will only be visible to you and me. ✙ To resolve the issue, I may need your consent to deactivate and reactivate plugins and the theme, as well as make configuration changes on the site if necessary. This emphasizes the significance of having a backup. |
January 10, 2024 at 9:43 am #15167833 | |
eun-kwangH |
Hi Kor, Sorry for inconvenience. I just activated the temporary account. I'm still not sure how I should send you the FTP access details with the private key file. Basically, we're hosting at AWS and we access FTP with the private key. Let me know. Regards, EK |
January 10, 2024 at 2:14 pm #15169317 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your reply. I've checked and it looks like you've set to translate the region and it is not selected correctly on the English language here hidden link . So, I've corrected the region for you and it's displaying fine now hidden link . Could you check? |
January 10, 2024 at 11:04 pm #15171831 | |
eun-kwangH |
Hi Kor, Thanks for your help. However, It does not seem to work for me yet. Please check out the attached screenshots. For me, the question really comes down to the reason why certain ACF fields do not capture the translations, and I would like to know how to make it work. Do you think it has something to do with caching? If I need to exclude any JS file of WPML from caching, please let me know which. hidden link Regads, EK |
January 11, 2024 at 7:19 am #15172344 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your reply. We apologize for the inconvenience, but in order to proceed with troubleshooting, we kindly request a site snapshot. Alternatively, with your permission, we can create a snapshot on our own. For this purpose, we typically recommend using the free plugin "Duplicator." If you are already familiar with how Duplicator works ( https://wordpress.org/plugins/duplicator/), please skip the following steps and simply send me the archive file you downloaded. To assist you further, please follow these instructions: Refer to the instructions provided by WPML on how to provide supporters a copy of your site: https://wpml.org/faq/provide-supporters-copy-site/ If the archive file exceeds 400MB in size, please utilize Duplicator's file filters to exclude the cache, wp-uploads directory, media, and archive files. Once you have the archive file, please share the link with us. You can use services such as Google Drive, Dropbox, or similar platforms as the snapshot file will likely be large. Please note that your next reply will be private, visible only to you and me. You can paste the link to the file there. Rest assured that once the issue is resolved, I will delete the local site. |
January 12, 2024 at 7:55 pm #15180686 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thank you for getting back to me. I'm sorry for the delay in responding. I've successfully imported a copy of your website to my local development environment, and I will now proceed to review it. I will provide you with an update as soon as possible. |
January 13, 2024 at 1:06 am #15180885 | |
eun-kwangH |
Thanks for your note, Kor! |
January 15, 2024 at 8:22 pm #15186990 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thanks for your patience. I apologize for the delay. I would need more time to investigate this and I will come back to you as quickly as possible. |
January 17, 2024 at 4:59 pm #15196314 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
I appreciate your patience in this matter. Regrettably, I haven't found a solution yet, and I'll have to take this to our 2nd Tier Support for a more in-depth investigation. Could you kindly try to recreate the problem on our sandbox website here hidden link ? I've gone ahead and installed the WPML plugins for your convenience. All you need to do is upload and activate the "Search & Filter Pro" plugin on the site and generate a few examples to replicate the issue. After that, I'll pass along this sandbox site to our 2nd Tier Support for additional help. |
January 18, 2024 at 7:16 am #15198164 | |
eun-kwangH |
Hi Kor, Thank you so much for your engagement. I'm more than willing to work through the sandbox, but I may need a little more time. I'm tied up with preparing for a presentation for a hotel conference in January 24. Would it be fine for me to take some time and let you know? Regards, EK |
January 18, 2024 at 2:27 pm #15200500 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thank you for your response. Not a problem at all. If you encountered any issues with the sandbox site when you checked, please don't hesitate to inform me, and I'll be more than happy to create a new sandbox site for you. |
January 22, 2024 at 1:12 am #15209202 | |
eun-kwangH |
Hi Kor, I'm leaving this message just to keep this ticket alive. In the meantime, I would like to confirm with you that it looks like the issue is really about how to make the translations for ACF choice fields recognized while keeping their translation preference as "copy once". I followed the article below and translated the labels through String Translation: It seems like "search & filter" is working, but the metas for posts in the post list are not recognizing the translations yet. hidden link Can you confirm above, and I'll recreate the issue in the sandbox, this week. Regards, EK |
January 22, 2024 at 4:30 pm #15212839 | |
Kor Supporter
Languages: English (English ) Timezone: Asia/Singapore (GMT+08:00) |
Thank you for your response. I've reviewed your settings, and everything appears to be correctly configured. However, there seems to be an issue with "Search & Filter Pro" retaining translations for both languages when filtering. I've examined the compatibility of the plugin using https://wpml.org/plugin/search-filter-pro/, and while it indicates compatibility, since the last testing date is somewhat dated, we may need to conduct a more in-depth investigation to resolve this problem. Therefore, I kindly request that you take some time to replicate the issue on a sandbox site. This will allow me to investigate further or potentially escalate the matter to our second-tier support for additional assistance. Your cooperation is greatly appreciated. |
January 25, 2024 at 12:49 am #15224300 | |
eun-kwangH |
Hi Kor, I'm working on the sandbox, and installed CPT UI and ACF. However, I cannot install Elementor Pro and Search & Filter Pro as my license is full. Also, I need Advanced Custom Fields Multilingual as well. Can you help with this? Regards, EK |