Skip Navigation

[Resolved] view disappear + wpml

This support ticket is created 6 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 16 replies, has 2 voices.

Last updated by Shane 6 years ago.

Assisted by: Shane.

Author
Posts
#1128260
capture.jpg

Hi,
I have a problem displaying a view when I'm on a page translation. I use the wpml plugin.
When I'm on the page in French, everything works but when I display the page in English the view disappears.
See this page for exemple : hidden link

But paradoxically it is displayed when the translation of the elements of the page is not done yet.
See this page for exemple : hidden link

Can you help me about that ?

Thank you so much
Olivier

#1128426

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

Thank you for contacting our support forum.

Would you mind allowing me to have a look at this for you ? It could be a setting in WPML that is causing this to happen.

Thanks,
Shane

#1128482

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

I was trying to find the template that was used to build the pages.

Could you point me to the view or content template that was used to build the pages ?

Thanks,
Shane

#1128917

Hi Shane,

The template is a single page 'single-artiste.php' in the ftp folder of my theme 'jauneorange'.

The problematic view is 'dyscography_vue' 'agenda_artiste' and 'agenda_artise_old'.

Here is the code of the content template 'single-artiste' :

<?php
/**
 * Template Name: single-artist
 */

get_header(); ?>


<div class="container">
		<div class="row equal">
			<div class="col-xs-12 col-sm-6">
				<div class="white-inner"><?php echo do_shortcode('[types field="artiste-image" size="full-size" class="img-responsive"][/types] ');?></div>
				<?php echo do_shortcode('[wpv-view name="artiste_video_vue" ]');?>
				<?php echo do_shortcode('[wpv-view name="agenda_artiste" ]');?>
			<?php echo do_shortcode('[wpv-view name="agenda_artiste_old" ]');?>
			</div>
			<div class="col-xs-12 col-sm-6">
				<section class="band-details">
					<h2><?php echo do_shortcode('[wpv-post-title]');?> <span class="nationalite"><?php echo do_shortcode('[types field="artiste-nationalite"][/types] ');?></span></h2>
					<h3><?php echo do_shortcode('[wpv-view name="liste_categories_vue" ]');?></h3>
					<?php echo do_shortcode('[types field="artiste-description"][/types] ');?>
					<div class="row album-shop-section">
						<div class="col-xs-12 socials">
						<?php echo do_shortcode('[wpv-view name="reseaux_sociaux_artistes_vue" ]');?>
						</div>
					</div>
				</section>
				<?php echo do_shortcode('[wpv-view name="discography_vue" ]');?>
			</div>
		</div>
</div>


<?php get_footer(); ?>

Thank you Shane.

Olivier

#1129236

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

It seems to me that this might have been translated using the string translations plugin
hidden link

Rather than the conventional way of translating posts. The would mean that an english version of this post does not have the translated children attached to it. Our views plugin will try to pull the relationships of that translated version but since an actual translation does not exist then the view is not returning any results.

Thanks,
Shane

#1129269

Hi Shane,

I do not understand how I can solve my problem using the string translation plugin?
the view shows no results but should display the results of the view in French,
there is a way to automatically duplicate the French to English , knowing that there will never be any translation for this content.

Thank you
Olivier

#1129339

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

I would recommend that you have a look at the WPML Document for how to do this.

https://wpml.org/documentation/getting-started-guide/

Please let me know if this helps.
Thanks,
Shane

#1129914

Hi Shane,
I tested translating post children (albums) but it still shows no results while the English translation does exist.
Is it due to the fact that it is a post-relationship (album - artiste - particiapant) ?
I did not find anything in the documentation that would answer my question.
thank you in advance for your help
Olivier

#1130148

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

Yes this is due to the relationships. The view is trying to pull a relationship that is attached to the translated post, in the currently view language.

Thanks,
Shane

#1130564

Hi Shane,

And what should be done to make it work?
When I translate posts, the view is not displayed when it should be displayed.
She returns no results. I created the translations so there must be some results displayed.
I do not understand why with the translation done, nothing is displayed ?

Thanks,
Olivier

#1130711

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

Here on this post.
hidden link

The english version. If you take a look at the Albums section you will see that there are no posts assigned here. What you need to do is assign the english versions here.

Once this is done then the posts should show on the frontend.

Please let me know if this was clear.

Thanks,
Shane

#1131442

Hi Shane,

But I would like the content to be the same as in French and therefore the content and the post relationship is automatically duplicated. I can't t ask my client to manually duplicate all posts (parents, children and intermediary...) it seems very long for something that seems simple.
In summary, when my client encodes a new album, it should be automatically duplicated in English as well as his post relationship.

Thanks.

Olivier

#1132071

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

Is the expectation that the duplicate be written in English Automatically ? Or do they want it to remain in French even on the English translation.

Please let me know .

Thanks,
Shane

#1132078

Hi Shane,
There is no translation for the albums but for the artists (which is a parent post) So when I'm on a single artist page, he must display the description of the artist in English and the albums in french because there are no translations for albums, these are song titles so it remains the same in French and English.
Thanks
Olivier

#1132104

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Olivier,

As long as on the translation of the Artiste, the albums are connect again through the relationships then it should work fine.

Like with this one here.
hidden link

The english version has the relationships connected.
hidden link

Please let me know if this clears things up a bit.

Thanks,
Shane