Skip Navigation

[Closed] Several Views inside a Views leads to a long time to display a page

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 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Waqar 8 months ago.

Assisted by: Waqar.

Author
Posts
#2638693

Pat

Hello,

I have a Views the list all the products (228 currently). Inside this Views, I need to display for each product (in addition with some standard items) the number of users that have bought this product.
Each time a user buys a product, a post is created (ins-enseignement) with the product ID. The user is the author of the post.
Then, I have created another Views that list all users that are author of the ins-enseignement.
That works fine, but when I want to display the page which list all products, then I need to wait more than 30 seconds !!!
If I remove the second Views, then the page display in less than 1 second.
I have placed as a screenshot the second Views (Backoffice nb inscits a un cours) and here is the loop of the first one that lists the products :

<td>[wpv-post-id]</td>
<td>[types field="nom-de-l-evenement"][/types]</td>

<td>[types field="type-d-evenement"][/types]</td>

<td>[wpv-conditional if="( $(wpcf-type-d-evenement) eq 'Ateliers' ) OR ( $(wpcf-type-d-evenement) eq 'Langues' ) OR ( $(wpcf-type-d-evenement) eq 'Informatique' )"][types field='jour'][/types]</br>[types field='heure'][/types]h[types field='minutes'][/types][/wpv-conditional][wpv-conditional if="( $(wpcf-type-d-evenement) eq 'Conférences' )"][types field='date-evenement' style='text' format='d/m/y'][/types]</br>[types field='date-evenement' style='text' format='G'][/types]h[types field='date-evenement' style='text' format='i'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-type-d-evenement) eq 'Sorties' )"][types field='date-evenement' style='text' format='d/m/y'][/types][/wpv-conditional]</td>
<td>[wpv-post-title item="@formateur-product.parent"] [types field='prenom-formateur' item='@formateur-product.parent'][/types]</td>
<td>[wpv-post-title item="@localisation-product.parent"]</td>
<td>[wpv-conditional if="( $(wpcf-type-d-evenement) eq 'Ateliers' ) OR ( $(wpcf-type-d-evenement) eq 'Langues' ) OR ( $(wpcf-type-d-evenement) eq 'Informatique' )"][types field='jour'][/types]</br>[types field='heure'][/types]h[types field='minutes'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-type-d-evenement) eq 'Conférences' )"][types field='date-evenement' style='text' format='d/m/y'][/types]</br>[types field='date-evenement' style='text' format='G'][/types]h[types field='date-evenement' style='text' format='i'][/types][/wpv-conditional]
[wpv-conditional if="( $(wpcf-type-d-evenement) eq 'Sorties' )"][types field='date-evenement' style='text' format='d/m/y'][/types][/wpv-conditional]
</td>
<td style="text-align:right;">[wpv-woo-product-price]</td>

<td>[types field="date-prevente" format="d/m/Y"][/types]</td>
<td style="text-align:right;">[wpv-post-field name='_stock']</td>
<td style="text-align:right;">[wpv-view name="backoffice-nb-inscits-a-un-cours" anneeuniv="[annee_univers]" idprod="[wpv-post-id]" ]</td>
<td style="text-align:right;">[wpv-view name="backoffice-nb-attente-a-un-cours" anneeuniv="[annee_univers]" idprod="[wpv-post-id]"]</td>
<td>[wpv-conditional if="( $(wpcf-annule) eq '1' )"]Oui[/wpv-conditional][wpv-conditional if="( $(wpcf-annule) eq '0' )"]Non[/wpv-conditional]</td>
<td>[types field='desactivation-dela-fiche' state="checked"]Non[/types][types field='desactivation-dela-fiche' state="unchecked"]Oui[/types]</td>
<td>[toolset-edit-post-link content_template_slug='backoffice-modification-fiche' class="new-tab-link" target='self']Modif[/toolset-edit-post-link]</td>
<td><a href="[wpv-post-url]" target="_blank">Voir</a></td>
<td style="min-width:5%;">[cred_delete_post_link action='trash' text='<span style="color:red;font-weight:bold;">X</span>' message_after='La suppression a bien eu lieu' message='Etes-vous sûr de vouloir supprimer cette fiche?' message_show='1' class='cred-refresh-after-delete']</td>
<td><a href="hidden link" class="et_pb_button" target="_blank" rel="noopener">ADMIN</td>

Let me know if there is another way to manage this?

Regards
Pat

#2639757

Waqar
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi Pat,

Thank you for contacting us and I'd be happy to assist.

First, we apologize for the delay in getting back to this ticket. We added some updates to the system and this particular ticket was stuck in a state where it couldn't be answered.

It is understandable that the more products you have, the more processing and queries will be needed to cycle through each of their individual nested views and data elements.

Still, If you could share temporary admin login details, along with the link to the page, I'll be able to see the current setup and suggest some possible improvements, accordingly.

Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.

regards,
Waqar

The topic ‘[Closed] Several Views inside a Views leads to a long time to display a page’ is closed to new replies.