Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom form missing #56

Open
johno14 opened this issue Dec 22, 2016 · 7 comments
Open

Custom form missing #56

johno14 opened this issue Dec 22, 2016 · 7 comments

Comments

@johno14
Copy link

johno14 commented Dec 22, 2016

Good day! I just did a fresh install of osTicket and the latest version of the Equipment plugin. I believe I was able to follow the installation instructions religiously but for some reason, I wasn't able to locate the equipment form. Any help is much appreciated.

Below are the specifics of my environment in case you need it.
osTicket:

Server Information
osTicket Version v1.10 (901e5ea) — Up to date
Web Server Software Apache
MySQL Version 10.1.14
PHP Version 5.5.35

EquipmentPlugin
OSTEquipment Plugin 1.9.4

Additionally, I also bumped into a database problem. For some reason, the below error is visible on all the pages in osTicket.

"[ALTER TABLE afa5_equipment CHANGE COLUMN name asset_id VARCHAR(255) NOT NULL , ADD COLUMN staff_id INT NULL AFTER is_active, ADD COLUMN user_id INT NULL AFTER staff_id DROP INDEX name] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DROP INDEX name' at line 5[CREATE VIEW afa5_EquipmentTicketView AS select afa5_equipment_ticket.equipment_id AS equipment_id, afa5_equipment_ticket.ticket_id AS ticket_id, afa5_equipment_ticket.created AS created, afa5_equipment.category_id AS category_id, afa5_equipment.is_active AS is_active, afa5_ticket_status.state AS status from ost_equipment_ticket left join ost_equipment on(ost_equipment_ticket.equipment_id = ost_equipment.equipment_id) left join ost_ticket on(ost_equipment_ticket.ticket_id = ost_ticket.ticket_id) left join ost_ticket_status on(ost_ticket.status_id = ost_ticket_status.id)] Table 'u973160515_vemeq.ost_equipment_ticket' doesn't exist
Error parsing SQL schema! Get help from developers (#4)
Upgrade configuration error. Unable to upgrade database tables!"

Thanks in advance!

@poctob
Copy link
Owner

poctob commented Dec 26, 2016

Did you look at other closed issues? It sounds similar to some others that have been resolved.

@johno14
Copy link
Author

johno14 commented Dec 27, 2016

Thanks for responding. I actually did try a number of possible resolutions which I compiled below. Apparently, the issue I'm getting isn't related to most of it. I tried to reinstall osTicket and installed the latest version of the plugin, however, whenever I enable the plugin I keep getting the database error and there's nowhere to find the equipment form as shown in the attached screenshots.

end_result_after_enable

image

The error is most definitely not about an outdated MySQL instance as I have the below server information in place.

Server Information
osTicket Version v1.10 (901e5ea) — Up to date
Web Server Software Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.28
MySQL Version 10.1.19
PHP Version 5.6.28

Possible solutions tried:
- Done a fresh install - error
#27 - Not applicable
#38 - Used both upstream and release version - error
#35,#36,#41 - MySQL version is updated - error
#39 - Checked and ensured dbase privilege - error

After working on the possible resolutions, I'm still stuck with the below error implying an incorrect SQL syntax as show below. Not sure where to start but given that it is your code, perhaps we can get it fixed as I see it to be common on most installation.

Thanks for your help.

[ALTER TABLE johno_equipmentCHANGE COLUMNname asset_idVARCHAR(255) NOT NULL , ADD COLUMNstaff_idINT NULL AFTERis_active, ADD COLUMN user_idINT NULL AFTERstaff_idDROP INDEXname] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DROP INDEX name' at line 5[CREATE VIEW johno_EquipmentTicketViewAS selectjohno_equipment_ticket.equipment_idASequipment_id, johno_equipment_ticket.ticket_idASticket_id, johno_equipment_ticket.createdAScreated, johno_equipment.category_idAScategory_id, johno_equipment.is_activeASis_active, johno_ticket_status.stateASstatusfromost_equipment_ticketleft joinost_equipment on(ost_equipment_ticket.equipment_id=ost_equipment.equipment_id) left join ost_ticket on(ost_equipment_ticket.ticket_id=ost_ticket.ticket_id) left join ost_ticket_status on(ost_ticket.status_id=ost_ticket_status.id)] Table 'osticket.ost_equipment_ticket' doesn't exist Error parsing SQL schema! Get help from developers (#4) Upgrade configuration error. Unable to upgrade database tables!

@poctob
Copy link
Owner

poctob commented Jan 3, 2017

Sorry for a late reply. I was out for holidays.

So this one sounds exactly like #54 which was fixed in the upstream. Are you sure that you are using upstream code correctly?

@ErikLeeOlson
Copy link

I WAS getting this error as well. I believe the only difference between the release version and the current commit is where some of the SQL prefixes were changed from hard coded "ost_" to %TABLE_PREFIX%. which would have caused the problem for anyone using non-default table prefixes.

That was not the case with me, however.

Turns out, /scp/system.php->Information shows that my dev environment is running version 1.8, because I had cloned it from the wrong repo.

@ErikLeeOlson
Copy link

^ hmmm, same error after reinstalling v1.10, "Table 'osticket.ost_ticket_event' doesn't exist". Is this an artifact from a previous version that exists when you upgrade but doesn't from a fresh install?

@ErikLeeOlson
Copy link

[ALTER TABLE ost_equipmentCHANGE COLUMNname asset_idVARCHAR(255) NOT NULL , ADD COLUMNstaff_idINT NULL AFTERis_active, ADD COLUMN user_idINT NULL AFTERstaff_idDROP INDEXname] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DROP INDEX name' at line 5[CREATE TRIGGER ost_ticket_event_AINSAFTER INSERT ONost_ticket_eventFOR EACH ROW BEGIN IF NEW.state='closed' THEN SET @equipment_id = (SELECT equipment_id FROMost_equipment_ticketWHERE ticket_id=NEW.ticket_id LIMIT 1); IF ((@equipment_id IS NOT NULL) AND (@equipment_id>0)) THEN SET @open_ticks = (SELECT COUNT(ticket_id) FROMost_EquipmentTicketViewWHERE equipment_id = @equipment_id ANDstatus!= 'closed'); IF @open_ticks = 0 THEN SET @status_id = (SELECT status_id FROMost_equipment_statusWHERE baseline=1 LIMIT 1); IF ((@status_id IS NOT NULL) AND (@status_id>0)) THEN UPDATEost_equipmentSET status_id = @status_id WHERE equipment_id = @equipment_id; END IF; END IF; END IF; ELSEIF NEW.state='created' THEN SET @status_id = (SELECT status_id FROMost_EquipmentFormViewWHERE ticket_id= NEW.ticket_id AND field_label='Status' LIMIT 1); SET @asset_id = (SELECT value FROMost_EquipmentFormViewWHERE ticket_id= NEW.ticket_id AND field_label='Asset ID' LIMIT 1); IF( @asset_id IS NULL) THEN SET @asset_id_str = (SELECT value FROMost_EquipmentFormViewWHERE ticket_id= NEW.ticket_id AND field_label='Equipment' LIMIT 1); SET @asset_id = (SELECT SUBSTRING_INDEX(@asset_id_str, 'Asset_ID:', -1)); SET @asset_id = SUBSTRING(@asset_id, 1, CHAR_LENGTH(@asset_id) - 2); END IF; SET @equipment_id = (SELECT equipment_id FROMost_equipmentWHERE asset_id= @asset_id); IF ((@status_id IS NOT NULL) AND (@status_id >0)) AND ((@equipment_id IS NOT NULL) AND (@equipment_id >0)) THEN UPDATEost_equipmentSET status_id = @status_id WHERE equipment_id=@equipment_id; INSERT INTOost_equipment_ticket (equipment_id, ticket_id, created) VALUES (@equipment_id, NEW.ticket_id, NOW()); END IF; END IF; END] Table 'osticket.ost_ticket_event' doesn't exist Error parsing SQL schema! Get help from developers (#4) Upgrade configuration error. Unable to upgrade database tables!

@mahathir83
Copy link

I get this error also. Can someone help me on this.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants