Skip Navigation

[Escalated to 2nd Tier] Bootstrap Tooltip data-content attribute not accepting [wpv-post-body]

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

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 11 replies, has 2 voices.

Last updated by Nigel 5 years, 10 months ago.

Assisted by: Nigel.

Author
Posts
#1168586
Screen Shot 2018-12-18 at 11.04.37.png

I am trying to:

Put [wpv-post-body] into a bootstrap tooltip.

Instead, I got:

But it keeps showing "[wpv-post-body]" in the body area of the tooltip.

It works with

[wpv-post-title]
[wpv-post-id]
[wpv-post-excerpt length="999" count="word"]

but not [wpv-post-body]

#1168666

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Michael

You are inserting just wpv-post-body and not including the view_template attribute, which is not optional (even if it is 'none', meaning show the post content of the current post).

https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-body

Update your shortcode to include the view_template attribute, and let me know if there is still a problem.

#1168691
Screen Shot 2018-12-18 at 13.55.18.png
Screen Shot 2018-12-18 at 13.54.28.png

Hi Nigel,

sorry for the confusion.

I also tried already before with [wpv-post-body view_template="None"] and [wpv-post-body view_template='None'].
I just Screenshoted with the last version I tested and that was without.

However neither of the two deliver the wanted result. Please see new screenshots.

Michael

#1168714

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

I can't reproduce the problem, I've used the post body as the title of the tooltip without issue.

I'm wondering if it is something related to the particular structure of your page (looks like you are displaying the content within tabs).

Can you do something of a vanilla test, based upon the markup from the Bootstrap docs (hidden link)?

Create an unassigned Content Template like so:

<button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="[wpv-post-body view_template='None' suppress_filters='true']">Content in a button</button>

Add the following custom JS:

( function( $ ) {
	$( document ).ready( function(){
		$('[data-toggle="tooltip"]').tooltip()
	});
})( jQuery );

Now edit a post, e.g. Hello World, and assign that Content Template.

View the post. The tooltip should work. (I added output='raw' to prevent the content being wrapped in p tags.)

If it works then we'll need to see what is specific about your set-up that explains why it doesn't.

If it doesn't then perhaps we have some conflict interfering here, and you'll need to re-test with non-Toolset plugins disabled and using a default theme.

#1168806

Hi Nigel,

I created the content template as per your instructions. And it worked.

I then deactivated all plugins. And only updating to WP 5.0.1 did it then work.

What WP are you running?

I do not really wan't to update to 5.0.1 on my live site if it is avoidable.

Michael

#1168829

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Yes, I'm on 5.0.1 (will be 5.0.2 later this week).

What version are you on? 4.9.8?

If that's the case I can test with that. We are not requiring people to upgrade to WP 5.0.

#1168831

Hi Nigel, yes I am on 4.9.8

Hope you can replicate my issue there 🙂

Michael

#1169552

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Screenshot 2018-12-19 at 10.54.18.png

Hi Michael

I tried this on an older site, although the security update to 4.9.9 had already been applied, but still, pre-5.0.

The test I described above worked, as you can see in the screenshot.

So, that's with WP 4.9.9, Types 3.2.2 and Views 2.7.1

If I re-read this reply (https://toolset.com/forums/topic/bootstrap-tooltip-data-content-attribute-not-accepting-wpv-post-body/#post-1168806) it isn't clear where the test I proposed works for you and where it does not.

Could you clarify? (And test with 4.9.9)

#1169586
Screen Shot 2018-12-19 at 12.31.16.png
Screen Shot 2018-12-19 at 12.31.33.png
Screen Shot 2018-12-19 at 12.33.25.png
Screen Shot 2018-12-19 at 12.19.25.png
Screen Shot 2018-12-19 at 12.18.55.png

Hi Nigel,

my comment on it working was for the content template you had me create there it worked on 4.9.8

But I am using the tooltip inside a view.

I just tried 4.9.9 and it does not work. With 5.0.1 it does.

I also tried with posts rather then my custom post type "bibliography" just to make sure but no luck. Also all plugin were deactivated besides toolset.

View template:

<div class="pop wpv-view-layout-56784" data-container="body" data-toggle="popover" data-placement="top" data-content="[wpv-post-body view_template='None']"
data-original-title="" title="">– Tooltip
</div>

JS:

$(".pop").popover({ trigger: "manual" , html: true, animation:false})
.on("mouseenter", function () {
var _this = this;
$(this).popover("show");
$(".popover").on("mouseleave", function () {
$(_this).popover('hide');
});
}).on("mouseleave", function () {
var _this = this;
setTimeout(function () {
if (!$(".popover:hover").length) {
$(_this).popover("hide");
}
}, 300);
});

#1169798

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, I set up a vanilla 4.9.9 test site and added a popover to the output of a View and I was then able to reproduce the problem.

I've escalated this so it can be examined further by my colleagues and I'll keep you posted.

#1193082

Hello, has there been any progress on this issue?

Michael

#1193101

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Michael

I'm afraid not. I just checked the internal tickets and it is escalated to the Views project, but isn't currently being worked on.

I've added a comment pointing out that you are waiting on a fix, and I'll let you know what reply I get.