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

Last updated by Konrad Karpieszuk 11 months, 4 weeks ago.

Assigned support staff: Konrad Karpieszuk.

Author Posts
October 5, 2018 at 7:57 pm #2791607

karenC-14

I am trying to:

The Customers custom post type and industries and sub industries are set to:
Translatable - use translation if available or fallback to default language

But when we add the ACF homepage translations / switch it to french they do not show up.

Customers is one of the post types they are not doing the translations for but need available across all translations. This could be user error and any clarification would be helpful.

October 8, 2018 at 9:37 am #2795352

Konrad Karpieszuk
Supporter

Languages: English (English )

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

Hello

I am Konrad and I will try to help you. Also, please forgive late answer, the forum is overloaded in last days 🙁

Could I get the access to your site's wp-admin so I will check if everything is set correctly? I mark your next reply as private

October 9, 2018 at 1:16 pm #2800128

Konrad Karpieszuk
Supporter

Languages: English (English )

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

Hello

this is a bit big site, I have some follup questions 🙂

- wp-admin > custom fields. which field is responsible for displaying customers on the homepage?

- what if you disable acfml plugin (and re-save translated version of the frontpage, first making sure all fields look as expected). Does issue still exist?

October 9, 2018 at 2:58 pm #2800558

karenC-14

Hi Konrad,

Yeah - it's a very large site.

It's Custom Fields / Homepage / Homepage Customer Stories / Case Study Customer Logos

The behavior is also present Custom Fields / Homepage / Hero Form Sub Industries &
Custom Fields / Homepage/ Homepage Hero / Industry Name

We tried your recommended fix and it it's still an issue. I tried to take some screenshots of where we are seeing the fields populated and not populated when we move between languages.

Thanks for helping look into this.

October 10, 2018 at 11:16 am #2803958

Konrad Karpieszuk
Supporter

Languages: English (English )

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

Hello

you didn't provide FTP access, so I need to ask you for help:

could you open this file wp-content/plugins/sitepress-multilingual-cms/classes/query-filtering/class-wpml-display-as-translated-attachments-query.php

there is method called adjust_post_parent(), could you replace it to be:

	public function adjust_post_parent( $q ) {
		if ( isset( $q->query['post_type'] ) && 'attachment' === $q->query['post_type'] && $this->sitepress->is_display_as_translated_post_type( $q->query['post_type'] ) && $this->sitepress->get_current_language() !== $this->sitepress->get_default_language() ) {

			if ($q->query_vars['post_parent']) {
				$q->query_vars['post_parent__in'] = array(
					$q->query_vars['post_parent'],
					$this->post_translation->get_original_element( $q->query_vars['post_parent'] )
				);

				unset( $q->query_vars['post_parent'] );
			}
		}

		return $q;
	}

and then see if it helps.

October 10, 2018 at 8:18 pm #2805715

karenC-14

This is added, but did not fix things from my end from what I can tell.

October 11, 2018 at 8:21 am #2807160

Konrad Karpieszuk
Supporter

Languages: English (English )

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

OK, so I need to download your site and debug. Could you:

- install https://wordpress.org/plugins/duplicator/ plugin on your site
- generate duplicator package

when it is done, please ping me here, I will download it directly from your wp-admin

October 15, 2018 at 12:28 pm #2817399

karenC-14

Hi Konrad,

Sorry for the delay here. I had to get permission to do this. This has been completed. Let me know if you have any questions. It was my first time using that plugin.

-Chris

October 17, 2018 at 10:03 am #2824129

Konrad Karpieszuk
Supporter

Languages: English (English )

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

Hello,

I installed your site locally. Let's focus for now on Case Study Customer Logos field, ok?

I see that on the French version of the home page, in wp-admin there are some company names on the right: Afton Chemical, AGC Glass Unlimited etc.

Also when I visit front end in French, I see those logos in form of scattered icons.

The only issue which I see is in wp-admin, on the left side there is nothing to choose. Please see the screenshot.

Is it the only issue (related to Case Study Customer Logos field) or am I missing something else?

I want to assure we are on the same page before I proceed to fix this

October 17, 2018 at 12:38 pm #2824603

karenC-14

Hey Konrad,

Yes we need those options to show on the left side. The reason you see the ones on the right is because when we made the translation we overwrote it with English content. So far it's the only issue we've encountered.

-Chris

October 19, 2018 at 11:20 am #2831786

Konrad Karpieszuk
Supporter

Languages: English (English )

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

Hello

this should be fixed with this version of ACFML plugin. Could you replace it on your site and confirm or deny?

hidden link

October 22, 2018 at 2:20 pm #2838426

karenC-14

Hey Konrad,

This worked! At least on local. We need to merge it up into staging and triple check though. Couple quick questions. If WPML releases an update will this fix get overwritten? And if so how do we proceed?

-Chris

October 23, 2018 at 6:20 am #2841004

Konrad Karpieszuk
Supporter

Languages: English (English )

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

No risk here. Please keep this version but observe when ACFML 0.9 will be released, then it will be official and you probably will have to manually update.

The WPML updates will not break this

October 23, 2018 at 3:45 pm #2843345

karenC-14

Hey Konrad - thank you! It worked in both environments. The other fields not working are the sub industry fields. I've attached a screenshot this is on the homepage with french selected.

I know you wanted to tackle the issues one at a time so I didn't want to start asking questions when I noticed this didn't start working with the last fix.

-Chris

October 24, 2018 at 1:15 pm #2846358

karenC-14

Hey Konrad,

This new message is related to our original thread.

It looks like even with the correct logos selected and showing they only show on the front-facing side for english, but not for French. I even tried removing the French logos and re-adding them to see if it was a database issue. That didn't solve it.