Overview
When trying to update a ticket from the Staff Control panel, you might get the following fatal error:
Uncaught Exception
Invalid data provided in ./__swift/library/Data/class.SWIFT_DataID.php:70
=================================================================================================================================
#0 ./__swift/library/Data/class.SWIFT_DataID.php(38): SWIFT_DataID->SetDataID('0')
#1 ./__apps/tickets/models/Ticket/SWIFT_TicketCrudTrait.php(837): SWIFT_DataID->__construct('0')
#2 ./__apps/tickets/models/Ticket/class.SWIFT_Ticket.php(1189): Tickets\Models\Ticket\SWIFT_Ticket->ProcessSLAOverdue()
#3 ./__apps/tickets/staff/Controller_TicketReplyTrait.php(144): Tickets\Models\Ticket\SWIFT_Ticket->SetStatus('11')
#4 ./__swift/library/MVC/class.SWIFT_Controller.php(385): Tickets\Staff\Controller_Ticket->GeneralSubmit('199768', 'inbox', '11', '4', '-1', '0')
#5 ./__swift/library/App/class.SWIFT_App.php(174): SWIFT_Controller::Load(Object(SWIFT_Interface), Object(Tickets\SWIFT_App_tickets), Object(SWIFT_Router), NULL)
#6 ./__swift/library/class.SWIFT.php(16): SWIFT_App->ExecuteController(Object(SWIFT_Router))
#7 ./__swift/library/class.SWIFT.php(16): SWIFT->Initialize()
#8 ./__swift/swift.php(16): SWIFT::GetInstance()
#9 ./staff/index.php(29): require_once('/home/support/p...')
#10 {main}
Fatal error: Uncaught SWIFT_Exception: Invalid data provided in /home/support/public_html/__swift/library/Data/class.SWIFT_DataID.php:70 Stack trace: #0 /home/support/public_html/__swift/library/Data/class.SWIFT_DataID.php(38): SWIFT_DataID->SetDataID('0') #1 /home/support/public_html/__apps/tickets/models/Ticket/SWIFT_TicketCrudTrait.php(837): SWIFT_DataID->__construct('0') #2 [internal function]: Tickets\Models\Ticket\SWIFT_Ticket->ProcessSLAOverdue(false, false) #3 {main} thrown in /home/support/public_html/__swift/library/Data/class.SWIFT_DataID.php on line 70
There are two possible reasons why this problem may occur:
- Outdated templates and languages
- Outdated user profiles or organizations
Solution
The first thing to consider is to check whether you have outdated templates and languages. When you log in to the admin control panel, you will typically see alerts from the home screen related to outdated templates and languages. When you see these alerts, it's a good sign to update your templates and languages.
Restoring Languages
NOTES:
- Take a back-up copy before performing the restore by navigating to Admin CP > Languages > Import/Export > Export.
- You need admin access with "update languages and language phrases" permission to perform the steps below.
For restoring languages, navigate to Admin CP > Languages > Restore > Search the languages > Select the phrases > Restore.
Restoring Templates
NOTE: You need admin access with "Restore templates to originals" permission to perform the steps below.
For the restoring templates, follow these steps:
- Navigate to Admin Control Panel
- Click Templates and click Restore.
- Ensure the 'Yes' radio button is selected for 'Out of date'.
- Click the Search button at the top of the section.
- You will see a list of any of the templates that you had modified that need to be updated to the newest versions. Select all the templates by clicking the checkbox in the header row.
NOTE: This is an excellent opportunity to make sure you have local backups of your modified templates. Before doing the next step, you may want to visit the Managing Your Template article to learn more about managing your template modifications. - When you are ready, click the Restore button on the page to overwrite your modified templates with the new versions.
Updating the User and the User's Organization
If the problem persists after restoring languages and templates, or if there are no alerts pertaining to outdated languages and alerts, consider updating the user and the organizations. Check the user and the organization to which the user belongs to on the ticket where the error is appearing. Once you have identified this information, follow these steps:
NOTE: You need staff access with "update users and user organizations" permission to perform the steps below.
To Update the User:
- Navigate to Staff Control Panel.
- Click Manage Users.
- Search and open the relevant user account.
- Without doing anything, click the Update button.
To Update the User's Organization:
- Navigate to Staff Control Panel.
- Click Manage Organizations.
- Search and open the relevant user's organization.
- Without doing anything, click the Update button.