bcombs18 / osTicket-Inventory-Manager

An Inventory Managment plugin for osTicket.
MIT License
12 stars 4 forks source link

"Missing CDATA table. Get technical support." #68

Open xarim96 opened 2 years ago

xarim96 commented 2 years ago

Hi I'm using osTicket v1.16.2 and php 8.0.0, i followed your steps to install the plugin but I am stuck on the step of creating the api key as the table and settings aren't showing up in application>inventory manager image

bcombs18 commented 2 years ago

@xarim96 Sorry for the delay in response. This error happens when the installer script for the plugin fails to complete properly. Usually, deleting the plugin from the Settings > Manage > Plugins menu and re-adding it will resolve this issue, however, it may fail to uninstall the plugin since the API key table in the database has not yet been modified. To get around this, I recommend downloading the latest release of the plugin and replacing your current copy of it with the new one which adds some error handling for this specific issue.

In the event that it still will not uninstall, you may need to run the following from a MySQL terminal: ALTER TABLE ost_api_key ADD COLUMN can_create_assets; . Then try uninstalling and reinstalling the plugin.

The CDATA table is supposed to be created automatically by osTicket, but if the plugin doesn't install correctly, as you're seeing here, that never happens.

xarim96 commented 2 years ago

image I am getting this error when I am trying to delete this plugin from the osticket now.

bcombs18 commented 2 years ago

@xarim96 This is the error I was referring to in my previous response. You'll need to run ALTER TABLE 'ost_api_key' ADD COLUMN 'can_create_assets'; manually from your database. Then try deleting the plugin again.

If you don't have access to your database via a terminal, you can delete the plugin from your plugins directory on your server. This will cause the plugin to be listed as "defunct" and you should be able to delete it from the plugins menu. Afterwards, download the v1.1.5 version of the plugin and try again.

xarim96 commented 2 years ago

image @bcombs18 Thanks for your response. I was able to delete the plugin and updated it, also replaced the dispatcher.php file in the osticket/scp directory, checked staff backend interface and inventory. But the problem is still there. It is still missing the CDATA Table.

bcombs18 commented 2 years ago

@xarim96 Okay, it seems like the install script is still failing to complete properly. Try deleting and re-adding the plugin from the plugins menu a couple more times. If it still continues to fail after that, I'll see if I can find a way to force the CDATA table's creation.

Usually, it just takes a few attempts when this issue comes up. This one is a bit tricky since that table isn't created by the plugin itself, but by osTicket instead.