tooltips in admin aren’t showing (due to a bug in the common code?)
-
Hi,
I had some red warning icons next to the ticket amounts in the event editor, but it wasn’t clear why. When I looked at the markup there was a
<div class="down">
element which contained a warning text, but the functionality to make it visible wasn’t running.During my investigation I noticed that \the-event-calendar\common\src\resources\js\tooltip.min.js wasn’t loading and it seems that the cause of that is in common\src\Tribe\Service_Providers\Tooltip.php where the tribe_asset() call that initiates the script loading in add_tooltip_assets() passes an empty action parameter instead of the enqueue hook.
When I changed the call to…
tribe_asset( $main, 'tribe-tooltip-js', 'tooltip.js', [ 'jquery', 'tribe-common' ], [ 'admin_enqueue_scripts' ], [ 'groups' => 'tribe-tooltip' ] );
…the problem was solved and clicking on the icon toggled the tooltip.
I don’t know if the script is also used on the front-end of the plugin, and wp_enqueue_scripts should be added too, but this is a bug in the commmon code of the program and when both event tickets and the events calendar are active the script is loaded from the events calendar. That’s why I offer it here.
I haven’t checked if the script is only loaded on event related pages, since that would be best practice, but I trust it will.
Please correct this bug.
regards,
Hans
- The topic ‘tooltips in admin aren’t showing (due to a bug in the common code?)’ is closed to new replies.