jnaran
Forum Replies Created
-
Forum: Plugins
In reply to: [Event Tickets and Registration] Version 5.16.0.1 Breaks Screen OptionsMy site has also crashed with 5.16.0. I am unable to update to 5.16.0.1 with the cPanel WP Toolkit.
Here’s my error code:
Selected items were updated with errors:
Unable to update plugin 'event-tickets', details: Fatal error: Uncaught TEC\Common\StellarWP\DB\Database\Exceptions\DatabaseQueryException: Database Query in /home/ithacapc/public_html/wp-content/plugins/event-tickets/common/vendor/vendor-prefixed/stellarwp/db/src/DB/DB.php:296 Stack trace: #0 /home/ithacapc/public_html/wp-content/plugins/event-tickets/common/vendor/vendor-prefixed/stellarwp/db/src/DB/DB.php(84): TEC\Common\StellarWP\DB\DB::runQueryWithErrorChecking(Object(Closure)) #1 /home/ithacapc/public_html/wp-content/plugins/event-tickets/common/vendor/vendor-prefixed/stellarwp/schema/src/Schema/Tables/Contracts/Table.php(504): TEC\Common\StellarWP\DB\DB::delta('\n\t\t\tCREATE TABL...') #2 /home/ithacapc/public_html/wp-content/plugins/event-tickets/common/vendor/vendor-prefixed/stellarwp/schema/src/Schema/Builder.php(277): TEC\Common\StellarWP\Schema\Tables\Contracts\Table->update() #3 /home/ithacapc/public_html/wp-content/plugins/event-tickets/common/vendor/vendor-prefixed/stellarwp/schema/src/Schema/Register.php(138): TEC\Common\StellarWP\Schema\Builder->up() #4 in /home/ithacapc/public_html/wp-content/plugins/event-tickets/common/vendor/vendor-prefixed/stellarwp/db/src/DB/DB.php on line 296 Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website. [error]FailedToExecuteWpCliCommand: exit status 1[/error]Forum: Plugins
In reply to: [M Chart] Tooltip Dataset labels missingNo I didn’t see it for some reason – there was nothing in my spam either. Not sure what happened there. Did you get my email with all my data?
Forum: Plugins
In reply to: [M Chart] Tooltip Dataset labels missingThanks Jamie, really appreciate your help. Just sent you an email.
Forum: Plugins
In reply to: [M Chart] Tooltip Dataset labels missingJust to follow up on this, I can fix the tooltip labels in the browser console using the code below:
m_chart_chartjs_3889_1.chart_args.options.plugins.tooltip.callbacks.label = function(context) { var label = context.dataset.label || ''; if (label) { label += ': '; } if (context.parsed.y !== null) { label += context.parsed.y; } return label; }But how do I modify “m_chart_chartjs_3889_1” before it has been created? For more context, I can add a sum at the bottom of the tooltip using the chart defaults:
Chart.defaults.plugins.tooltip.callbacks.afterBody = (ttItem) => (Sum: ${ttItem.reduce((acc, val) => (acc + val.raw), 0)});But when I try to modify the default label function, it reverts to a different function after the chart loads. This is what I want it to be:
Chart.defaults.plugins.tooltip.callbacks.label = function(context) { var label = context.dataset.label || ''; if (label) { label += ': '; } if (context.parsed.y !== null) { label += context.parsed.y; } return label; }This is what it loads as when I access it via the console:
>m_chart_chartjs_3889_1.chart_args.options.plugins.tooltip.callbacks.label < a=>m_chart_chartjs_helpers.chart_tooltip_label(a,r,t,e,_)I think it is getting overwritten at some point. Any help would be greatly appreciated!