Markus Michalski FAQ

Subticket Manager: Troubleshooting

Troubleshooting the osTicket Subticket Manager: panel missing, queue icons missing, linking fails, wrongly linked tickets, rate limit, activation errors, debug log and common questions.

Deutsche Version

Back to overview

Subticket Manager: Troubleshooting

Panel does not appear in the ticket view

Symptoms: A ticket opens normally but the "Parent Ticket / Child Tickets" section is missing, or osTicket shows a PHP error after activation.

Check:

  1. Autoloader: Does include/plugins/<folder>/vendor/autoload.php exist? Without this file the plugin cannot find its classes. On the Git route it is missing until you have run composer install --no-dev.
  2. Plugin active: The Subticket Manager must be enabled under Manage → Plugins.
  3. Staff area: The panel appears only in the staff area, not in the client portal.
  4. JavaScript: Open the browser console. If it shows [Subticket] Failed to load subticket-panel.js, the file at <osTicket>/include/plugins/<folder>/js/subticket-panel.js is not reachable for the browser, for example because the web server blocks access to include/.
  5. Browser cache: Reload the page with Ctrl+Shift+R.

Queue icons are missing

Symptoms: Parent tickets show no code-fork icon in the queue.

Check:

  1. The script only acts on pages whose path contains tickets.php, and only on rows with a link of the form tickets.php?id=<ID>.
  2. As a logged-in agent open <osTicket>/scp/ajax-subticket.php?action=batch_parent_status&ticket_ids=15 in the browser. The response must contain "success": true. If the file does not exist, copy it to scp/ as described under Installation.
  3. Check the browser console for messages with the prefix [SubticketManager].
  4. The script starts 500 ms after the page has loaded. If osTicket changes the table via AJAX afterwards, reload the page.

Linking fails

Symptoms: After Link to Parent the message Failed to link tickets or Invalid parent ticket ID/number appears.

Check:

The panel does not always state the reason. For failures in linkTicket the plugin writes the cause with the prefix [SUBTICKET-PLUGIN] to the PHP error log.

Ticket unexpectedly became a child

Symptoms: A ticket created normally shows up as a child of another ticket.

Cause: You clicked Create Subticket earlier but did not submit the form. The plugin keeps the parent ID in your session until a ticket is created.

Solution: Remove the link with Unlink from Parent. In future either create the subticket or log out when you discard the form.

"Too many requests"

The AJAX actions children, link, unlink and create allow 100 requests per 60 seconds per session. After that the plugin blocks the session for 60 seconds. This hardly happens in normal use. A loop in your own code can trigger the limit.

Errors on activation

Symptoms: Activation reports Target directory not writable: ..., Failed to deploy file to scp/... or Source file not found: ....

Solution:

  1. Give the web server user write permission on the scp/ directory.
  2. Check that the scp-files/ folder with the three files exists in the plugin folder.
  3. Alternatively copy the files by hand (see Installation).

HTTP 500 from ajax-subticket.php

Message Cause
SubticketPlugin not found No file class.SubticketPlugin.php exists under include/plugins/*/
Multiple SubticketPlugin installations detected The plugin exists more than once. Remove the extra copy
Controller not found ajax/SubticketController.php is missing in the plugin folder

Reading the debug log

With SUBTICKET_DEBUG the plugin writes to /tmp/subticket-debug.log. Typical lines:

The log contains ticket data. Disable debug mode after the analysis.

Frequently asked questions

Does the plugin close parent tickets automatically?

No. The plugin does not change any ticket status. The configuration fields for it (for example "Auto-close Parent Ticket") have no function.

Is there a tree view or batch functions?

No. The overview page lists existing relationships, at most 100 child tickets.

Can a ticket have multiple parents?

No. osTicket stores exactly one ticket_pid per ticket.

How many levels are allowed?

The plugin does not limit the depth. The loop check follows the chain at most ten levels deep.

What remains after uninstalling?

The links in ticket_pid always remain. Tables, the version column and indexes are removed only with the option Remove Data on Uninstall enabled, and the two commands for column and index work on MariaDB only.

Does the plugin work with a table prefix other than ost_?

No. All queries use ost_ hard-coded.

Can I manage subtickets through the REST API?

Yes, through the API Endpoints plugin. Details under Extending and Integration.