Skip Navigation

[Resolved] Layouts does not allow for a virtual page to have a layout.

This support ticket is created 7 years, 3 months 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.

This topic contains 4 replies, has 1 voice.

Last updated by MichaelR9215 7 years, 3 months ago.

Author
Posts
#555866

Hello,

I had a support post about a month ago, but it was closed. I never resolved my issues.

I am using a couple of plugins that have content that don't actually have physical pages.

Because I am using Layouts, when I navigate to these virtual pages, Layouts is giving me the front-end message "This page doesn't have a template layout" ... "Create a new Layout for...".

Since these pages are virtual, when I click the big blue button, I get an error message "An unexpected error happened." My guess is that Layouts is looking for an actual page or post type, and since there is nothing to find, it is returning an error.

I don't know how I am supposed to display these pages at this point. Some assistance would be greatly appreciated.

---

I did receive an answer to try using the default template Layout setting.

---

I tried setting the default Layout for when a virtual page is being used, but this did not work.

The page in question is hidden link

It is when I use the search bar in bbPress to search forums.

Please let me know if you have any other ideas.

Thanks!

#555905

I just realized that when I try to set the Layouts settings to "The content using a following 'default' Layout" that it says that my changes were saved, but when I refresh the page and go back to that section, it reset back to "A blank page with a message" ...

I disabled all plugins, and I am still getting this issue.

Any thoughts?

#555908

I tracked the issue down to something in my theme. It is a custom theme, but I have built it specifically to work with Toolset.

Can you thin of what could be causing an issue preventing a setting to be saved?

#555909

I found the function causing issues! Do I need this in my custom theme?

/**********************************************************************
 *     Force setting to show message when no layoout is assigned
 ********************************************************************/

if (defined('WPDDL_VERSION')) {
  add_filter( 'ddl-template_include_force_option', function ( $option ) {
    return 1;
  }, 999, 1 );
}

#555910

This function LITERALLY forces the Layouts setting to NOT change.

Oh my lord... my virtual pages are now working with a default layout!!

Phew 🙂