Markus Michalski FAQ

Tab Swap: Troubleshooting

Troubleshooting Tab Swap: swap not applied, missing elements, customized themes, strict CSP, other plugins, swap lost after navigation, and frequent questions.

Deutsche Version

Back to overview

Tab Swap: Troubleshooting

Problem: The tabs are not swapped

Symptoms:

Check in this order:

  1. Is the plugin enabled in the admin panel under Manage > Plugins?
  2. Is the Enable Tab Swap option switched on in the configuration? See Configuration.
  3. Is the script on the page? Open the page source of the ticket view in the browser and search for data-plugin="tab-swap". If it is missing, the signal is not processed (plugin off, option off, or the page is not a ticket view).
  4. If the script is present, check in the browser (developer tools, element inspector) that #post-reply-tab, #post-note-tab, #reply, #note and #response-tabs exist on the page. If one of the first four is missing, the script does nothing. This applies, for example, if osTicket outputs only one of the two tabs for the agent.
  5. Reload the page (Ctrl+F5 or Cmd+Shift+R) so the browser does not show an old page state.

Problem: A custom theme or another plugin changes the tabs

The script depends on the element IDs #post-reply-tab, #post-note-tab, #reply, #note and #response-tabs. If a customized theme uses other IDs or another plugin rebuilds the tabs, the swap may not happen or the display may differ. To test, deactivate the other plugin.

Problem: A strict Content Security Policy blocks the script

The plugin outputs the script inline. If a Content Security Policy forbids inline scripts, the browser does not run it. The plugin sets a nonce attribute only if the CSP_NONCE constant is defined. The browser console names the blocked source.

Problem: The swap is gone after switching to another ticket

The script runs the swap again after pjax:success and after redraw.staff. If the ticket view is loaded in some other way, this only works if the page contains the script again or fires one of the two events. Reload the page and report the case with the details from the Support section of the overview.

Frequent questions

Does the plugin change osTicket files or web server configuration?

No. It hooks into the object.view signal and outputs an inline script. No .htaccess is changed and no JavaScript file is loaded.

Do I keep my settings when I deactivate the plugin?

The plugin does not delete any settings on deactivation. It has no code for that.

Does the plugin affect the API or how replies are sent?

No. It only changes how the ticket view is displayed in the browser.

Which PHP versions are checked?

CI runs the syntax check and the PHPUnit tests with PHP 7.4, 8.0, 8.1, 8.2 and 8.3.

Does the plugin work with older osTicket versions?

The plugin is built for osTicket 1.18.x. The code gives no information about other versions.