• Resolved Hans Schuijff

    (@hanswitteprins)


    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @hanswitteprins

    Thanks for bringing this issue to our attention. I haven’t yet been able to replicate this issue on my test site with this combination of plugins, but I will keep an eye out for it.

    Glad to hear that you have been able to find a workaround for now.

    Let me know if you have any other questions!

    Thanks,
    Jaime

    Thread Starter Hans Schuijff

    (@hanswitteprins)

    Hi Jaime,

    To replicate this issue, you might want to add event tickets plus to the mix. I don’t know what exact other situations the tooltips are added. When they are added the script should load too, but it doesn’t.

    In my case the the warning icons reported “The number of Complete ticket sales does not match the number of attendees. Please check the %1$sAttendees list%2$s and adjust ticket stock in WooCommerce as needed.” and off course that is a event tickets plus warning. The functionality for handling tooltips is however part of the common code.

    I found that when you add a completed ticket order in woocommerce and than change the status of it to cancelled, then the ticket isn’t released again in Event Tickets and the above warning is a result of that mismatch.

    I will probably also dive in this issue at some point, but haven’t found the time yet. Cancellations don’t happen very often (luckily).

    I have solved the tooltip issue in my install, but when the warnings are shown, the script isn’t loading. The workaround is not really a workaround, I just change that part of the plugin I mentioned manually. There is probably a better way.

    Hope it helps.

    regards,

    Hans

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @hanswitteprins

    Thanks for providing me with this further information.

    If you are still experiencing this issue, would you mind opening up a ticket here for premium support: https://support.theeventscalendar.com/submit_ticket

    Have a wonderful day!

    Thanks,
    Jaime

    Thread Starter Hans Schuijff

    (@hanswitteprins)

    Hi @jaimemarchwinski

    I have solved it for myself, but the bug in remains and I just wanted you folks to know what it is.

    I cannot add tickets to premium support, so it’s up to you what you want with it. I’ve told you what goes wrong.

    regards,

    Hans

    Plugin Support Jaime

    (@jaimemarchwinski)

    Hi @hanswitteprins

    Thanks for sharing, glad to hear that you have been able to resolve this issue for yourself.

    We will continue to test and see if we can replicate the issue locally.

    I’m going to mark this thread as Resolved for now but feel free to open up a new one if anything else comes up.

    Have a wonderful weekend!

    Thanks,
    Jaime

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘tooltips in admin aren’t showing (due to a bug in the common code?)’ is closed to new replies.