Skip Navigation

[Résolu] render_view_template does not allow to display content any longer

This support ticket is created Il y a 8 années et 11 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 8:00 – 17:00 -
- - - - - - -

Supporter timezone: America/Sao_Paulo (GMT-03:00)

Marqué : 

This topic contains 51 réponses, has 6 voix.

Last updated by simonE-3 Il y a 8 années et 8 mois.

Assisted by: Adriano.

Auteur
Publications
#302888

I am trying to:
I am allowing my client to display the information within the database [CPTs] using reusable PHP blocks.
Here is what I do [in pseudocode]:

I load the Photographer's record
        I load the Photographer's post using the Photographer's ID
        I then execute render_view_template on a blank template as a blank slate
end
I then display whatever information I need: it can be a field, a view, etc.
end

So, for example:

/* ---------------------- Load Photographer ----------------------------*/
$thispost = get_post('%%postid%%');
echo render_view_template('8581', $thispost);
/* ----------------------- Display a view ---------------------------*/
[wpv-view name="phr-Gear-MostFavorite"]

I expected to see:
This used to work very well and I could use the template as a blank slate out of the loop to display any kind of information from the CPTs.

Instead, I got:
Now it does not work any longer and the blank template does not open the "display port" nor allows anything to be displayed after it is called.
> Please restore the way it used to work as it was very practical to have a common code block to open a "display port" then display anything I wanted in it without having to create a specific template every time.

#302896

Here is some more information on the website:
- hidden link
- Of course I can provide you with the credentials if we open a private communication channel.

#303011

Shane
Supporter

Languages: Anglais (English )

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

Hi Stephen,

Thanks for contacting our support forum.

Yes please provide me with the admin credentials.

I will be enabling the private fields for you to enter this information.

Thanks

#303014

Here are some precisions:
- please use the test page: hidden link
- there is one Global Content Block [hidden link; defined in the page
- You can access this GCB here: hidden link

Basically, here is the list of actions:
- load the Photographer by his ID > works
- then load the form template #8581 which is empty and serves as a blank slate to display what follows > DOES NOT WORK ANY LONGER
- then display the view phr-Gear-MostFavorite which works perfectly in other parts of the website

#303205

Shane
Supporter

Languages: Anglais (English )

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

Hi Stephen,

I tried logging in however my attempts were not successful.
Could you please check the login information for me and let me know when I can attempt to log in.

Thanks

#303206

Hi Shane,
Thank you for your help.
Can you open a private conversation?

Best,
Stephen

#303207

Shane
Supporter

Languages: Anglais (English )

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

Hi Stephen,

I've enabled the private fields.

Thanks

#303438

Hi Shane,
Hope you're doing well.
Any update on our problem?

Best,
Stephen

#303480

Shane
Supporter

Languages: Anglais (English )

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

Hi Varun,

Thanks for the patience.

I'm a bit confused about your setup logic, particularly on here : hidden link

I also noticed that you have this shortcode here [wpv-view name="phr-Gear-MostFavorite"]

Instead of using %%postid%% try using this function get_the_ID();

Example:

$post_id = get_the_ID();
$thispost = get_post($post_id);
echo render_view_template('8581', $thispost);

I'm currently consulting with the team members to get this resolved for you.

Thanks

#303549

Shane
Supporter

Languages: Anglais (English )

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

Hi Stephen,

While I eagerly await your response I went ahead and escalated your ticket so that a higher level of support staff can have a look at this.

They should be able to assist you better than I can with this issue.

Thanks

#303555

Hi Shane,
I use a parameter passed to Global Content Blocks because I need to display whoever Photographer I want by his/her ID.
I tested the passing of parameters and it works perfectly.
The cause of the issue lies in the third line: the render view of a blank template used to work very well to open the way for other displays.
It does not work any longer.

Best,
Stephen

#304242

Hi,
I had no news from you since the last message to Shane. I guess Shane escalated the issue to the developers.
My client is getting very impatient and so am I.
Please let me know what solution you could provide for this issue.

Best,
Stephen

#304870

Shane
Supporter

Languages: Anglais (English )

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

Hi Stephen,

I must apologize for not posting a response, checking our system I noticed your ticket has been assigned to a higher tier support so I expect that it will be handled soon.

What I did however was to add a reminder so that your ticket can be handled.

Thanks

#306684

Shane
Supporter

Languages: Anglais (English )

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

Hi Stephen,

In order to help with the problem we would like for you to downgrade a previous version of views where this was working.

We would like to see it working on your website to assist with the issue concerning the update.

Thanks

#306896

I am putting my correspondence with Caridad here so we have a central location to manage it.

Dear Udi

We are having trouble understanding and reproducing the issue on our side. The development team has already been looking into this and we asked you yesterday to revert to a working version:

https://toolset.com/forums/topic/render_view_template-does-not-allow-to-display-content-any-longer/page/2/

This would allow us to understand how it "should" work and compare the results with the current release.
An added benefit is that your site would be working while we resolve the problem.

Can you follow up in the forum about this?
--------------------------------------------------------------------------------------------------
Maybe another idea is to create a site (can be stg2) with a simple version of the problem.
Instead of making a full photographer, make a simple record and illustrate how the problem occurs on a smaller scale. This will help T&V debug it.
So the basic idea is to recreate the problem on a small scale.

If we need we can go on a call - all 3 of us - to discuss how to fix this.

I know that everyone is putting their best efforts to resolve this now, and I understand that Stephen does not have all the needed backups. lets try and be creative on how to solve this. The site is down for over 2 weeks now and we must get it to work.
------------------------------------------------------------------------

A small reproducible case would be perfect.

Thanks!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.