Post by Joe1234 » Mon Mar 04, 2024 1:04 am

3.0.3.9 and php 8.1
In my test shop I'm seeing an issue with td and tooltip. Ex
In the controller I have:

Code: Select all

		  $attributes = "<table>";
		  foreach ($attribute['product_attributes'] as $product_attributes) {
			  $attributes .= "<tr><td><b>" . $product_attributes['name'] . "</b>:</td><td style='padding-left: 4px'>" . $product_attributes['description'] . "</td></tr>";
		  }
		  $attributes .= "</table>";
		  
....................................................................................................................

	'attribute'	 		=> $attributes,
And in the twig I have

Code: Select all

<span style="cursor: default; text-decoration: none; color: white;" data-toggle="tooltip" data-placement="top" title="{{ product.attribute }}">
Info
</span>
{{ product.attribute }}<!--attribute test example-->
The attributes will only show up when it is by itself. It wont show up in the title tooltip UNTIL I remove the <td> tags from the controller (it 'worked' fine with the <tr><table> tags). This happens even when I have the table and the span setup with the bare minimum coding to see if something else is throwing this off. This all worked fine in 3.0.3.8 and php 7.4. For now I had to do a div table to get it working which i'd prefer not to do because of all the extra css that needs to be put in...and I'd like to know what's going on for future issues.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by ADD Creative » Mon Mar 04, 2024 2:00 am

Could be that the later version of Bootstrap is removing the tags. Have you tried?

Code: Select all

data-html="true"

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by Joe1234 » Mon Mar 04, 2024 6:50 am

Thanks, but that didn't work. I don't know which bootstrap is here, but I even tried 'data-bs-html="true"' which is supposed to be for v5, but no luck there either.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by ADD Creative » Mon Mar 04, 2024 9:09 pm

You will need to add to following to the tooltip set up in catalog/view/javascript/common.js.

Code: Select all

sanitize: false

www.add-creative.co.uk


Guru Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom
Who is online

Users browsing this forum: No registered users and 18 guests