Skip Navigation

[Resolved] View outputs password field and send button on a protected page’s footer

This thread is resolved. Here is a description of the problem and solution.

Problem:
When I use the "CRED edit form links" to edit a specific post (I pass an ID to the ShortCode that generates the Link), any Content Template added to the link target page, is replaced by the template for the post itself.
How can I solve this?

Solution:
https://toolset.com/errata/content-templates-in-cred-edit-link-target-replaced/

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

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
- - 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 5 replies, has 2 voices.

Last updated by Ole 6 years, 8 months ago.

Assisted by: Beda.

Author
Posts
#619331

Ole
password-view.png

I am trying to: Display a view in the site's footer regardless if the current page is password protected or public

Link to a page where the issue can be seen:

I expected to see: The same View in every page's footer

Instead, I got: See screenshot. Message, password field and send button are displayed for every item in the view loop.

#619371

I can't easily replicate this.

I assumed first, eventually, a call to the post body in the View loop could actually be overwritten by the Password protection applied to the content filters, but it does not seem to be the case.

Can you let me know what exactly is in that View (maybe export and share it with me), and as well, if this issue persists in all Widget Zones and other themes as well, on your install?

Once I know what you have in the View's loop, I can try to re-test with this new data.

#619395

Ole

Hi Beda,
this error occurs in all widget areas in the footer and also when using standard twentyseventeen theme.
It's a taxonomy view of a custom taxonomy sorted by name:

Loop

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop wrap="2" pad="true">
		[wpv-item index=1]
		<div class="row ">
			<div class="col-sm-6">[wpv-post-body view_template="Loop item in Themen als Liste"]</div>		
		[wpv-item index=2]
			<div class="col-sm-6">[wpv-post-body view_template="Loop item in Themen als Liste"]</div>
		</div>
		[wpv-item index=pad]
			<div class="col-sm-6"></div>
		[wpv-item index=pad-last]
			<div class="col-sm-6"></div>
		</div>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]Keine Themen gefunden[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

Loop item

<span class="kb-footer-bs-item">[wpv-taxonomy-link]</span>
#619999

I cannot replicate this.

I created a Custom Post Type, a Custom Taxonomy, and created a few posts + terms with it.
Then I created a Taxonomy View and used the loop and settings you mention.
After I inserted this in the Footer Widget of 2017 Theme.

It works fine, no matter if I am logged in or out or on whatever page I view this.

This means something is interfering with your site, or some settings to replicate this are missed in the description of the issue.

Please make sure no other plugin or Theme is interfering, and if not, then I will need a copy of this site to see the issue myself and debug it locally.
https://toolset.com/faq/provide-supporters-copy-site/

#620087

The front end shows a neverending "pulsing" red circle, hence I deactivated the Theme and used Twenty Seventeen.

In the footer Widget, I made sure the View "Themen" is shown.

On the front page or any other page, I see no issue.

Here you described no matter what, you see the problem:
https://toolset.com/forums/topic/view-outputs-password-field-and-send-button-on-a-protected-pages-footer/#post-619395

It seems thou according to your last information, that this happens only on password protected posts.
I can confirm this on the copy of your site.

The Current solution to it is, remove the Content Template Loop Item and instead add the code directly to the Loop:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop wrap="2" pad="true">
		[wpv-item index=1]
		<div class="row ">
			<div class="col-sm-6"><span class="kb-footer-bs-item">[wpv-taxonomy-link]</span></div>		
		[wpv-item index=2]
			<div class="col-sm-6"><span class="kb-footer-bs-item">[wpv-taxonomy-link]</span></div>
		</div>
		[wpv-item index=pad]
			<div class="col-sm-6"></div>
		[wpv-item index=pad-last]
			<div class="col-sm-6"></div>
		</div>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]Keine Themen gefunden[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

This will solve the issue.

The problem is that you call a Content Template to style the post and 2 Loop Items (also Content Templates) in the View Loop.
These get overwritten by the calls to the first template, which styles the single post.

In my test, I had only the Loop items but no Content Template applied to the Content Itself.

Now I was able to replicate this:

1. Create a Taxonomy View of any kind
2. Make sure to insert a Content template in the Loop
3. Make sure to password protect a single post
4. Insert the View as Widget and visit that post

You will now see all the Posts from the View as password protected.

We have several similar issues with Content Templates replacing other the_content filter calls.

I will add this to that list so we can solve it as well.

#620438

Ole

Now it works! Thanks!