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]
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.
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
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.
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
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.
Hi Nigel, yes I am on 4.9.8
Hope you can replicate my issue there 🙂
Michael
Nigel
Supporter
Languages:
English (English )
Spanish (Español )
Timezone:
Europe/London (GMT+00:00)
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)
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);
});
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.
Hello, has there been any progress on this issue?
Michael
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.