Skip Navigation

[Resolved] Content Templates assigned from page editor no longer working

This support ticket is created 7 years, 1 month 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 24 replies, has 3 voices.

Last updated by Beda 7 years ago.

Assisted by: Beda.

Author
Posts
#495395
content_template_meta_AFTER_updates.jpg
content_template_meta_before_updates.jpg
same_page_after_updates.JPG
before_updates.jpg

I am trying to: View my website after updating to Layouts 1.9 & Views 2.3

I visited this URL: hidden link

I expected to see: A site similar to hidden link (nearly identical site without updates applied)

Instead, I got: A broken site that seemingly no longer uses content templates to display page body text from a View.

We are having some problems as of the newest toolset updates (Layouts 1.9 & Views 2.3), where content templates are no longer assignable to pages and no longer apply to pages' contents when displayed from a View.

We currently use a nested single page system as follows:
1) We have a parent page with child pages. The Parent page uses a Layout that contains a single View.
2) This View is set to show Pages that are children of the current page, in their Order as defined through the page editor. Each page is automatically shown within this View using the content template assigned to them from the Page Editor - this is achieved using [wpv-post-body] in the View's loop code.
3) Each Content Template assigned to our pages contains [wpv-post-body view_template='None'] (among other containers and elements) which allows that page's main body text to appear in the Content Template without resulting in a loop.

Since installing the update(s):
1) the "Content Template" meta box is now absent when creating new pages.
2) When editing existing pages that had a Content Template set previously, the Content Template meta box now shows a message indicating "Since this page uses a layout, styling with a Content Template is disabled" even though 'Don't use a layout' is selected in the "Template Layout" meta box.
3) On the front end of the website, we no longer see our content appearing within our previously assigned content templates for each page, just the bare body text.

As an example, hidden link is the same as hidden link, except with the new Toolset updates applied and some slightly different text content on the first link.

We use this method of using Content Templates, Views and Layouts to display data in order to keep page body text clean and free of containers and formatting, making each page a collection of data. This allows us to display the raw non-formatted text data in feeds, post sliders, and other elements such as content templates, views and layouts built using Toolset. The Toolset plugins have been indespensable in our goals to achieve this dynamic method of building pages. The newest "Content Layout" system doesn't work for us as a replacement solution as it places the code directly into the page body text area, now cluttering the page's data with formatting and code that may not be otherwise wanted in our other elements that pull this page data.

We are wondering if we are experiencing a bug with the "Content Template" meta box not appearing on new posts and no longer functioning on existing posts, or if the Toolset plugins are simply no longer capable of using a View to display a Page using a Content Template assigned from that Page's "Content Template" meta box.

Thanks,
Brian and Cam

#495519

Noman
Supporter

Languages: English (English )

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

Stop using layout.png

Hi Brian and Cam,

Thank you for getting in touch with us. I am not able to reproduce this issue at my end with latest versions of Toolset plugins.

1.You will need to use Content Template Cell inside layouts in this case and Content Template cannot be assigned like it would when Layout was not enabled.

We have also introduced Content Layouts in recent versions: https://toolset.com/documentation/getting-started-with-toolset/designing-contents-of-specific-pages/

2. On the front end of the website, we no longer see our content appearing within our previously assigned content templates for each page, just the bare body text.
>> Press “Stop using this Template Layout” (see attached screenshot) then select Content template you want to use for the page and Press Update button. Now you will see content on the page.

Looking forward to help you.
Thank you

#495573

Hi Noman,

I have recorded a video explanation which includes the issues we are experiencing, an attempt at following your solution, and a visual explanation of how our Layout, View and Content Templates work. Please see hidden link in full, with volume on for my commentary.

We are using a view in our layout to display a page's child pages within itself, as such manually adding each content template and choosing the page to show from within a layout is much less ideal. We also have no interest in using the Content Layout Editor for the reasons previously mentioned with displaying the pages' texts in feeds, sliders, and other pages without the same formatting.

When editing a page that previously had a content template set:

A) We are already not using a Layout on these child pages so the "Stop using this Template Layout" link is not available to us.

B) However if I select a Template Layout and hit OK, the "Stop using this Template Layout" link appears - clicking it then results in the Content Template select field appearing and allowing me to see the Content Template we chose previously, or select a new one. However once selecting "Update" OR once changing the Template Layout to "No Layout", the Content Template meta box shows the message again.

When creating a new page or editing a page that did not previously have a content template set, the Content Template meta box is simply not present.

Thanks,
Cameron

#495675

Noman
Supporter

Languages: English (English )

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

Clear pages.png

Hello Cameron,

Thank you for sending the video.

After the recent update of Layouts 1.9, you can only use Content Template Cell inside layouts and then apply the Layout on the Page (Home page in your case)

Content Template cannot be assigned directly to the page, like it was applying in previous version of Layouts + Views. However, old pages that were using Content Template will work as they were, but if you would like to change content template on old pages, then it needs to be inserted using new Content Layout.

Please remember to Clear Content template from the pages, go to: Toolset >> Content Template >> Usage for single page >> Pages >> Clear (see attached screenshot)

We have updated our doc and added the Videos as well in which you can see how to use Content template in Layout and then apply on the page:
https://toolset.com/documentation/getting-started-with-toolset/designing-contents-of-specific-pages/

- If your theme is integrated with Toolset Layouts: hidden link

- If your theme is not integrated with Toolset Layouts: hidden link

Please consider that “Template Layout” is applied on the Whole Page and the new “Content Layout” feature is applied only on the body Content part of the page.

I hope it helps, Thank you

#495858

"After the recent update of Layouts 1.9, you can only use Content Template Cell inside layouts and then apply the Layout on the Page (Home page in your case) . Content Template cannot be assigned directly to the page, like it was applying in previous version of Layouts + Views."

This would seem to indicate that your newest Layouts version is in fact not backwards compatible with sites made using previous versions and the previous workflow can no longer be used. Please also recall that we dynamically display child pages of a page using a View as to not have to repeatedly edit a home page layout and manually add each page in a content template within it.

"However, old pages that were using Content Template will work as they were"

As you can see from my video that I previously replied with, Content Templates in fact do not work as they were and the meta box is always dispaying the warning message regardless if a layout is chosen or not. Following your instructions yielded no positive result.

"but if you would like to change content template on old pages, then it needs to be inserted using new Content Layout."

Using Content Layouts places code directly into the body text for the page. Again, we do not want this for the reasons mentioned already. The ability to display a page's content in multiple areas and methods using different Content Templates, such as feeds and sliders, without cluttering the page's text content with formatting was one of the primary reasons for choosing Toolset to develop our theme over the past year.

"Please consider that “Template Layout” is applied on the Whole Page and the new “Content Layout” feature is applied only on the body Content part of the page."

On the contrary, the new "Content Layout" feature replaces the body content part of the page. This would meean any time I attempt to display the page's content, I'm going to end up with the whole formatted "Content Layout" rather than the body text only. Once again, as per the reasons listed above, this is very much problematic.

As a whole, this is particularly alarming as it means Toolset no longer supports the functionality that originally attracted us to adopting it as the backbone to our theme development, seriously undermining the themes and frameworks we have been working over the past year to develop on the promise that any updates to the framework would be backwards compatible and would continue to support productions built on previous versions.

If any other members of the support team that we've worked with in the past, such as Nigel or the likes, would like to chime in here, that would be of great assistance and most appreciated.

Thanks,
Cameron

#496043

Noman
Supporter

Languages: English (English )

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

Hello Cameron,

Thank you for your feedback. I totally understand your concern. I am going through the information you have provided and trying to see what I can do in this case. We will get back to you shortly.

Thank you

#496238

Noman
Supporter

Languages: English (English )

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

Hi Cameron,

Just wanted to let you know that I have asked this from our Layouts lead developer that what is really expected from this new feature and its backwards compatibility. I will update you as soon as I hear back.

Thank you for co-operation

#496396

Thanks so much Noman, we look forward to hearing back from you and appreciate all of your assistance in this matter.

Thanks as always,
Cameron and Brian.

#496758

Noman
Supporter

Languages: English (English )

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

Hello Cameron and Brian,

Thank you for waiting. I have heard back from our Layouts lead developer, below is the response:

1. “ Well the Template Layout in the old versions was already taking over Views Content Template metabox. It is a couple of years that it works this way if Layout is active the Content Template metabox is disabled in favour of layouts metabox.

Now with Content Layouts this one wins over the Template Layout metabox as well, there is no way at the moment to disable it, but client can open a feature request to add a filter which will let the client decide if he wants it enabled or not.

It is a change in design, due to which it is behaving like this by design decision. If one had already a content template assigned and working this is still working in front end if nothing else changes or overrides but the idea is to have people use Layouts Cells to display, position and style the content instead of a content template for new content. “

- If you would like to have this feature, then please submit this as a Feature Request in a new post and our Layouts team will review your suggestion, as well they are the ones to decide if we are going to offer this feature: https://toolset.com/forums/forum/support-2/

Please briefly describe your expectations in the feature request. Additionally, you are welcome to share the link to this thread in the new one as well.

2. Currently, please deactivate Layouts plugin. Assign content template to your page and make the changes you want to do and press Update. Go to front-end to see the content on the page.

- Then Activate Layouts plugin, but please do not make any change on the page where you have assigned the Content template, otherwise Layout takes over the hold on the page and breaks the content template and the content will not display on the front-end properly.

Have a great weekend.
Thank you

#496813

Hi Noman,

These answers certainly did not address our concerns regarding backwards compatibility as I am afraid I am still somehow being misunderstood, though I've explained it three times now:

Regarding Answer 1:

I am well aware that Content Templates are available only when a Template Layout is not chosen, I am not confusing old functionality from 2 years ago.

The page(s) in question do NOT use a Template Layout OR Content Layouts, HOWEVER the Content Template metabox is still showing the message "Since this page uses a layout, styling with a Content Template is disabled".

Please watch my Video, previously added, for a full walkthrough of this metabox breaking. Once again, everything was working fine before the most recent Layouts and Views update, and all Toolset plugins are regularly kept up to date.

Regarding Answer 2:

This workflow did not result in the pages' contents being displayed in the Content Templates assigned to each pages.

To be clear, these pages' contents are being displayed from a View on a DIFFERENT page's Template Layout. Until the most recent update, these pages' contents appeared in the Content Templates assigned to them in the Page Editor for each page.

Once again, to conclude, no Template Layout or Content Layout is assigned or ever was assigned to these pages, however the Content Template meta box still shows the message "Since this page uses a layout, styling with a Content Template is disabled", and simply does not appear whatsoever on new posts, making the functionality that was possible with our View previously now impossible. Whether this is a bug or not has yet to be explained. If it's not a bug, this puts at risk the themes and frameworks we have been working over the past year to develop on the promise that any updates to the framework would be backwards compatible and would continue to support productions built on previous versions.

I'm sorry if I'm sounding terse, I've explained this three times now and am growing increasingly anxious our problem has not even been acknowledged, let alone direction or support for implementing a solution.

Thanks,
Cameron and Brian

#497404

Noman
Supporter

Languages: English (English )

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

Hello Cameron and Brian,

Thank you for providing more details. Sorry about the trouble in this update. I feel we have lots of confusion in this thread and are going a bit in circles. So let's focus on one issue at a time and we will handle Content Template metabox message afterwards. I need to troubleshoot this in your actual setup. The main problem is that the child pages data is not shown on the page so let's try to sort this one first.

Can you please send us temporary access (WP-Admin) to your this site: hidden link
– preferably to a test site where the problem has been replicated if possible – in order to be of better help and check if some configurations might need to be changed.

Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

✙ Please add the Links to the [Page, Content Template, View] Edit Screen where you have setup it.

Looking forward to help you solve this.
Thank you

#498479

Noman
Supporter

Languages: English (English )

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

Hello Cameron and Brian,

Thank you for providing login and more information. I am going through all the details and debugging in your test site. I will get back to you as soon as I come to an outcome.

Have a great day,
Thank you

#498517

Noman
Supporter

Languages: English (English )

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

Hello Cameron and Brian,

I am not able to reproduce this issue at in my installation but I can see the problem in your test02 site. I have debugged and tested various ways but were not able to identify the actual thing that is causing this behavior, however I have understand the problem and can see it that Content Templates data is not shown on the pages or layouts as soon as we enable Layouts Plugin.

I am escalating this issue to our 2nd tier support for further review and we will get back to you.

Thank you for your co-operation and patience as we strive hard to resolve this.

#501370

Noman
Supporter

Languages: English (English )

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

Hello Brian,

Thank you for waiting on this. Our 2nd tier support thoroughly reviewed your site and theme, and they reported that:

1. Your theme is not properly integrated with Layouts and it is missing the standard Layout integration approach. Please follow correct way to integrate Layouts in this doc: https://toolset.com/documentation/user-guides/layouts-theme-integration/

2. Looking into your theme files, we have found that, the code does not check IF IS LAYOUTS ASSIGNED. The code is not even our official way to integrate layouts and uses the proper logic.

Our Content templates replace the_content()

Layouts calls do not include a the_content() fuction, this is why your integration code, as soon as it enables layouts, the_content() function is never reached in the code. This has always worked the same way in the Toolset. The way your theme currently integrates with layouts will not be working in a dynamic way, meaning where you can choose to use OR not use, a layout in single posts of your site.

Please check this theme for reference (it’s a custom theme and not officially supported): hidden link

Thank you

#501419
page-php-template.jpg

Hi Noman,

I'm unsure if perhaps they have looked at the wrong site, but I don't see how these statements could be possible:

1. "Your theme is not properly integrated with Layouts and it is missing the standard Layout integration approach"
a) Our parent theme is a clone of your own Toolset Starter theme in it's most recent version, with a TGMP script added to the functions.
b) Our child theme is a clone of your own Toolset Starter Child with new functions and styles. It does not contain modifications to the page template code.
c) Both absolutely do contain the proper method for integrating Layouts.
d) See attached for a screenshot of this code on the page.php template as an example.

2. "...the code does not check IF IS LAYOUTS ASSIGNED"
a) Our theme files are clones of your own Toolset Starter theme templates, do they not contain this proper layouts integration?
I do see the if ( defined( 'WPDDL_VERSION' )) line in all relevant templates already. Once again, please see attached.
b) NOTE: Adding the is_ddlayout_assigned() call to the above line, as seen in the MinimaX theme you linked, achieved nothing at all. Again, the Layout is already being displayed correctly, the issue is pages' contents not being displayed in their selected content templates when shown from a view.

Also we have only received an attempted answer regarding the display issues and not the broken content template meta box and would love to know what is causing this issue, as you also experienced with the post-update version of our sample deployments that we set up for you.

The issue here seemingly has to do with the newest version of Layouts' handling of content templates within a view in both the front and back end, I don't understand how this isn't clear after explaining this so many times. Again, sorry for the frustration, however we still have yet to receive a single response without incorrect statements regarding the issues being experienced with your theme and plugins. Access for both the pre and post updated versions of the deployment are still available for any of your debugging needs as previously provided.

Thanks,
Cameron and Brian

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