Overview
When trying to create a new user, the error 'Uncaught Exception: Invalid data provided...' is generated. This error also appears if a ticket from an unregistered user is being parsed or created.
Sample Error Log
Uncaught Exception
Invalid data provided in ./__swift/apps/base/models/User/class.SWIFT_UserOrganizationLink.php:347
=================================================================================================================================
#0 ./__swift/apps/base/models/User/class.SWIFT_User.php(503): Base\Models\User\SWIFT_UserOrganizationLink::LinkExists(0, '43307')
#1 ./__apps/tickets/models/Ticket/SWIFT_TicketGettersTrait.php(156):
Information
This issue was identified as a bug on v4.93.12 and lower. It was found out that there was no specific validation for the organization update operation on the user profile. So if a staff, who does not have the permission to update or add an organization to a user's profile, attempts to perform this action, the 'Uncaught Exception: Invalid data provided' error is generated instead of a validation error such as 'Insufficient permissions'.
To explain why this issue is also occurring when a ticket is created from an unregistered user; Kayako Classic is designed to automatically create a new user account if a ticket was initiated by an unregistered user. Creating a new user requires that an organization is to be added to it. Hence, if the same condition as stated above is detected, the 'Uncaught Exception: Invalid data provided' error is also generated.
Solution
The 'Uncaught Exception: Invalid data provided' error was fixed on version 4.93.13 and higher. You need to upgrade to the latest version of Kayako Classic.
- For Kayako Classic (Download), upgrade your instance. Please visit the Upgrading or Downgrading Your Kayako Classic Download KB article for information on upgrading your instance.
On the other hand, you also need to ensure the staff user has the right permission granted to update a user's organization.
To do this, follow the steps below:
- Login to the admin CP.
- Select Staff and click Manage Teams.
- Select the team where the staff belongs.
- Click the 'Permissions:Staff' tab.
- Under the Base section, ensure that 'Insert' and 'Update' options are checked on the 'User organization' permission.