Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 18 replies, has 4 voices.

Last updated by miguelF-2 1 year ago.

Assigned support staff: Sumit.

Author Posts
June 27, 2017 at 11:22 am #1306473

Martino

Hi there,
I'm having an issue with the compatibility between
ACF PRO,
WPML
and
FACET WP.

I'm using some custom fields to have my custom post type filtered with Facet WP.
I've set up 3 languages and I've translated the select label for the requested custom fields.
The problem is that the system only gets the last saved language for all the languages.

I used to fix it with a cheap workaround, by using multiple span class like this

<span class="la-it">Soja</span><span class="la-en">Soy</span><span class="la-de">Soja</span> 

and to show just the language I needed.

But some recent update broke it and now that code is rendered directly.
Here you have an example
hidden link
- first facet is in italian but i set up the correct language
- second facet was supposed to render the html so that I could show only the correct language but it doesn't work anymore.

June 27, 2017 at 2:39 pm #1306703

Otto
Supporter

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thank you for contacting the WPML support!

So there are two issues here, right?

First one, the ACF labels are not translated when using them as a facet with FacetWP.

Second, HTML tags inside ACF fields are rendered.

Am I right?

Can you please do this test to isolate the issues:
-Back up your site first
-Deactivate all the plugins that are not related to WPML, keep also FacetWP, FacetWP WPML and ACF PRO
-Switch for a moment to a WordPress default theme like Twenty Fourteen.
-If the issue is gone, activate one by one to see with which one there is an interaction issue

It would be great if you can test the second problem without FacetWP too.

The good new here is that we recently solved a issue with FacetWP and their team is really proactive:
hidden link

I think it is worthy to check the issue with them too, if you wish.

Let me know your results, please.

Kind Regards,

Otto

June 27, 2017 at 2:57 pm #1306736

Martino

Hello Otto,
thanks for the kind reply.

I did what you suggested although I couldn't disable all the plugins:
- CPT UI is essential to have the facet working since it's on a custom post type

Also switching to a basic theme wouldn't let me have the facets filter page active since it's on the custom theme.

With all that said I still had the same issues.

Anyway, you are right: there are two issues.
The html not rendered is a secondary issue but it's new. I was ok with the extra span code as long as the front end was ok. But the main issue is the translation of ACF labels.
A recent update on one of the 3 plugins changed something.

What is weird is that it seems to use always the last language saved. If I save the custom field in english it's going to show english. If I then save it in italian... weird.

Anyway, I did a little mistake: I'm not using AFC Pro in this specific case.

Thanks for any help you could give me.

June 27, 2017 at 5:30 pm #1306882

Otto
Supporter

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks for the explanation.

If you use the ACF labels outside the facets filter the translation works? Can you elaborate a bit on this facets filter (take into account that custom coding is beyond the scope of our support, anyway I would like to check it)?

Sorry to bug you with so many questions, I'm trying to isolate the issue as much as possible.

I noted that you don't have installed a WPML glue addon to work with ACF:
https://wpml.org/documentation/related-projects/advanced-custom-fields-multilingual/

Can you please install it and check if the issue persists?

Thanks for your cooperation.

Let me know your results, please.

Kind Regards,

Otto

June 28, 2017 at 8:30 am #1307268

Martino

Hi there!
Actually I was able to get the translated label on another project,
as pointed out on this thread
https://wpml.org/forums/topic/acf-select-label-translation/
by using

echo __($label,'acf_translation');

But since this is all handled by the plugin I don't know how to do it.

I installed the plugin you suggested me but I don't understand how to use it.
The thing is that I don't have to translate anything on the single post page, there I've just to select a custom field option (a select dropdown): the value would be the same for all the languages, the label is supposed to be translated but alway gets the last saved language.

I don't know what's the right way to get the right languages but I'm sure there must be one 🙂

June 28, 2017 at 8:34 am #1307270

Martino

Just to clarify,
this is what i used to do to solve my issue:

Alghe : <span class="la-it">Alghe</span><span class="la-en">Algae</span><span class="la-de">Algen</span>
Cereali : <span class="la-it">Cereali</span><span class="la-en">Cereals</span><span class="la-de">Getreide</span>
Glutine : <span class="la-it">Glutine</span><span class="la-en">Gluten</span><span class="la-de">Gluten</span>
Verdure : <span class="la-it">Verdure</span><span class="la-en">Vegetables</span><span class="la-de">Gemüse</span>

the first word is the select value, after that there is the select label.
having that as html would allow me to show just the correct label on the right language.
now this trick doens't work anymore so I'm back to the original problem.

June 28, 2017 at 2:02 pm #1307605

Otto
Supporter

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this I’ll need to temporarily install a plugin called “Duplicator” on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok for you.

** IMPORTANT **

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

- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

Kind Regards,

Otto

June 28, 2017 at 4:15 pm #1307741

Otto
Supporter

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I made a copy of your site to test locally.

I noted that the shortcodes for the facets work fine on your theme but they don't work on a default theme. As you are more familiar with FaceWP, do you know why this is happening?

Did you have the chance to contact FacetWP support? Any hint from them?

The labels seem to work fine outside the facet.

I'm checking the issue with our compatibility team to see if I am missing something.

Kind Regards,

Otto

June 28, 2017 at 4:26 pm #1307749

Martino

Uh,
I think you need to add a class to the facet loop to have it working automatically.
This is the doc:
hidden link

And this is the code I used:

<div class="row row-page-content">
	<div class="cont">
			<div class="prodotti-faccette">
				<div class="facet-side" id="facets">
					<h2><a href="#facet-blocks"><?php _e('Search products according to your preferences','biolab'); ?></a></h2>
					<div id="facet-blocks">
						<div class="facet-block">
							<h3><?php _e('Diet','biolab'); ?></h3>
							<?php echo facetwp_display( 'facet', 'dieta' ); 
							?>
						</div>
						<div class="facet-block">
							<h3><?php _e('Main Ingredients','biolab'); ?></h3>
							<?php echo facetwp_display( 'facet', 'ingredienti_principali' ); ?>
						</div>
						<button onclick="FWP.reset()"><?php _e('Reset','biolab'); ?></button>
						<div class="close-facet"><a href="#facets"><?php _e('Close the filter','biolab'); ?></a></div>
					</div>
					
					
				</div>
				<div class="facet-inner">
					<h1 class="entry-title"><span><?php _e('Our products','biolab'); ?></span></h1>
					<?php the_content(); ?>
					



					<?php
					// Display a template
					echo facetwp_display( 'template', 'default' );

					// Display pagination
					echo facetwp_display( 'pager' );

					?>
				</div>
			</div>
		
	</div>
</div>
June 28, 2017 at 6:34 pm #1307848

Otto
Supporter

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks.

I forwarded the ticket to our Themes & Plugins Compatibility Team and they will investigate further and contact the author if needed.

Please note that this process may take a while as it depends on how soon the author will reply to our efforts to contact him.

It would be great if you can also contact the author asking him to reply us. This may help expedite the process.

Kind Regards,

Otto

June 29, 2017 at 8:46 am #1308236

Martino

Hi Otto,
I'm already in contact with Elliot from Advanced Custom Fields and Matt Gibbs from Facet WP.

It's not really clear what plugin is responsible here for the issue.
Matt gave me a quick workaround to make the "span" solution working again but it would be nice to have it working as it's supposed to be 🙂

June 29, 2017 at 3:40 pm #1308799

Otto
Supporter

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I'm glad that you found a workaround.

I think it's a FacetWP-WPML issue, let's see what our compatibility team can find.

I will keep you posted.

Kind Regards,

Otto

July 4, 2017 at 8:59 am #1311416

Martino

Hello Otto,
I spoke with Elliot from ACF and this is his statement:

"I'm sorry to say, but I don't think I'll be able to solve this issue for you.
It looks like WP Facet includes support for ACF, and this works well.
The issue is that when WPML is active, the facet is unable to load in the correct field for each language.

It would be great if you can chat with both the Facet and WPML devs to flag this issue.
Perhaps the WPML integration would like to know about this issue so they can fix it."

This is just to keep you posted.

Cheers,
m.

July 4, 2017 at 8:30 pm #1312066

Otto
Supporter

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

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Thanks!

I passed the information to our second tier support. I also believe the issue is between WPML and FacetWP.

Let's see.

I will keep you posted.

Kind Regards,

Otto

July 19, 2017 at 11:59 am #1322688

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

I am Sumit from 2nd tier support.

We have checked this issue and found FacetWP is using a custom table to store the results and post data. Thus when you index the Facets they update the custom tables.
But the problem is ACF functions running on backend uses backend language thus whatever the backend language at the time of indexing FacetWP store the labels in their table and display on front-end regardless the front-end language.
We are in process to contact the FacetWP author about this issue you can also ping them to make this process fast.

I will keep you posted about the status of this issue.

Thanks