I created page with content for only logged users and added layout template with login and register form as an error layout for not logged persons.
But in some reason login layout doubled and ruined page view.
Page: hidden link
Why it could be?
Hello and thank you for contacting the Toolset support.
I wonder if this happens with a default theme such as TwentyTwenty? If yes, please check if this happens when only Toolset plugins are activated. It will tell us if there is an interaction issue with another plugin. If the problem disappears, start activating one at a time to track where the incompatibility is produced.
If this does not help finding the cause of the issue, I'll need to get a closer look at how the page is built. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **
Thank you for the credentials. I can see the issue, but I do not know what is causing it. I would like to take a copy of your website and debug it locally. Please let me know if that's fine with you, and I'll install a plugin to take the copy.
Unfortunately, the Duplicator plugin did not complete correctly. And the All In One Migration plugin is banned by the Kinsta platform.
However, they do offer downloadable backups that we can use. Can you share the last backup through Google Drive or Dropbox or a download link
hidden link
Hi! Your colleague Waqar helps me with this ticket: https://toolset.com/forums/topic/translated-custom-post-not-shown-in-filtered-view/ and he has copied site for internal testing in some way.
I could also try to download backup and share with you by google drive. But how could I send you the link in safe way?
I reached to Waqar and he was using Duplicator Pro instead of the free version. Your next reply will be private to let you share the download link safely. Otherwise, I'll install Duplicator Pro and try with it.
Hi Jamal,
it is really large file with a backup, unfortunately I could not upload it to google drive or dropbox due to their limitations. Could you try with Duplicator Pro?
I installed Duplicator Pro and took a copy of the website. From what I gathered so far, the page is part of a post group. The post group is configured to display a content template for guest users "Login Form2" hidden link
However, I cannot locate this template. So, I run some WPML troubleshooting to make sure all templates are assigned a language, but it did not help. I disabled WPML, and I still could not find the template. I assume that it was deleted.
Please, change the template for the post group and check if that fixes the issue. Toolset->Access Control->Post Groups(tab)->Logged-in users only test.
Hi! It is strange but I see this template. It is here: hidden link
Thank you for your feedback, and my apologies for missing this layout in the Unassigned layouts tab.
It turns out that the "Login Form2" layout has a parent layout. This, somehow, makes Toolset generate the layout's output two times.
In my local copy I created a new layout. I copied the Cell content to this new layout. Then I change its parent to make it unassigned to any parent layout. Check this screenshot hidden link
Then, I configured it on the Post Group permissions and it generated the content only one time.
To remove the parent layout from this "Login Form2" layout, follow the steps on the "Setting the parent layout" section of this the following article, and choose the first option "no parent".
https://toolset.com/documentation/legacy-features/toolset-layouts/hierarchical-layouts/#setting-the-parent-layout
I'll let you implement the same on your staging site. Let me know if you get stuck or have any further questions.
Ok. This is strange that login layout could not be a child layout. But I tried as you described. The problem is not about parent layout. If I just will remove parent layout from the "Login Form2" it will show only login form. But then it will be lost all other things like menu, footer, etc.
So, I try to make different - I took "Layout for Header and Footer Polo" which is main parent layout for the site and created a copy of it. Then I remove child section and added visual edit section and enter content of "Login Form2" content with login/signup forms to the new parent layout. And this layout includes all other blocks from original one except child section. And I set it as a group error layout. And then I see the same error as before. So, this is not the issue with the parent layout, this is an issue within layout.
Ok, I investigated it further... so, I find that the problem with duplicated login form exist only if one of the Layout section include this code:
[wpv-post-body view_template="topmenupolo"]
To be clear - in this content layout we include top dropdown menu. Thats all. So, then I added suppress_filters="true" to this code, like this:
[wpv-post-body view_template="topmenupolo" suppress_filters="true"]
the problem with duplicated login form solved.
BUT!!! Then I have a problem that in some reason it was inserted a lot of paragraphs (<p> and </p>) in formatting and entire front end layout is broken: hidden link - you could compare it with hidden link
This is strange as I specify within all included layout that it should not be automatic paragraphs inserted. But it looks like for "error" page for groups automatic paragraphs included not depend on what is specified in layouts.
Could you fix it?
I made the same procedure with staging and you could check it here:
hidden link
I can see the issue on the staging site. It looks to me that something is running the_content filter for the login form layout. Either something new introduced in the recent Toolset plugins, or a 3rd party plugin that is hooking too early or too late than Toolset and interferes with it.
IMHO, the quickest solution to this issue, would be to duplicate the layout and, instead of using the content template "topmenupolo", use its contents directly on the layout. This way we can avoid it running the_content filter.
On the other hand, to further debug this issue we'll need to exclude any 3rd party plugins and try to reproduce this issue on a clean install.
I created a test site on our platform, and you can log in to it with the following URL hidden link
I already installed Toolset Views and Layouts. Would you please try to reproduce this issue? Create the login form and layout, the parent layout, the content template that is causing the issue, etc. If reproduced, we can confirm that this was introduced by the last Toolset updates, and I'll escalate it to our developers. If it is not reproduced, we can suspect a 3rd party plugin, or an exception that happens only with your date. In that case, I'll escalate the copy of your website to our 2nd Tier team for further assistance.
In the meantime, as a workaround, I produced a custom Javascript code to remove the additional p tags. Add it to your layout's Javascript code section.
jQuery(function($){
jQuery('p').each(function(){
var p = jQuery(this)
if ( 0 == p.text().trim().length ) {
if ( p.hasClass('login-submit') ) return;
p.contents().each(function(){
if ( this.nodeType === Node.COMMENT_NODE ){
jQuery(this).remove()
} else {
jQuery(this).insertBefore(p)
}
})
}
})
jQuery('p:empty').remove()
})