Page 1 of 1

M4Hesk Uninstaller

Posted: Mon Sep 27, 2021 4:08 pm
by cwshubby
I uninstalled M4Hesk this weekend and it didn't convert my existing tickets from rich text HTML to plain text. I noticed the 2021 version, however the website is no longer up for one to download the new uninstaller.

What or how do I convert my existing tickets from having HTML formating to plain text?

Re: M4Hesk Uninstaller

Posted: Mon Sep 27, 2021 4:13 pm
by mkoch227
Regarding the MFH website, the host that provides the site has had issues for the past few days at this point, and all files are currently unavailable. You can download the latest build at https://gitlab.com/mike-koch/Mods-for-H ... 21.1.0.zip in the interim.

---

The uninstaller should have indicated that there were X tickets to convert.

If you have a backup of your database before uninstalling Mods for HESK and can restore it, feel free to do so and let me know. I'll be happy to look at the database and uninstaller to see if anything looks incorrect.

Re: M4Hesk Uninstaller

Posted: Mon Sep 27, 2021 8:52 pm
by cwshubby
I have already ran the old uninstaller.

If I re-run the uninstaller will it bork everything? Or is there a script I can run that just handles the conversion of the HTML tickets replies back to plain text?

Re: M4Hesk Uninstaller

Posted: Tue Sep 28, 2021 12:14 am
by mkoch227
The database column that indicated whether or not a ticket/reply message contained HTML is gone after the old uninstaller was processed. As such, it would be impossible to easily tell whether or not a ticket contained rich text or not.

Your best bet would be to recover a backup and re-run the 2021.1.0 uninstaller.

Possible solution if you do not have a backup (NOT RECOMMENDED)
If you know that all of your tickets contain rich text / HTML, you could trick the conversion process by re-adding the html column:

Code: Select all

ALTER TABLE `hesk_tickets` ADD `html` ENUM('0','1') NOT NULL DEFAULT '1';
ALTER TABLE `hesk_replies` ADD `html` ENUM('0','1') NOT NULL DEFAULT '1';
Then run the rich text conversion portion of the 2021.1.0 uninstaller.

The uninstaller should skip over any items that are already removed, however I cannot guarantee its behavior since you're running on an already-uninstalled copy of MfH. Additionally, if you have already installed HESK 3, the uninstaller might drop HESK 3-specific data; however I am not 100% sure.

Re: M4Hesk Uninstaller

Posted: Tue Sep 28, 2021 6:56 pm
by cwshubby
In excel I would do a search and replace "<*>" for ""

I would assume I could do the same in SQL if I knew the query lol.

Do you think something like that would work?

Re: M4Hesk Uninstaller

Posted: Tue Sep 28, 2021 8:35 pm
by cwshubby
Would something like this do the trick?

http://www.sqlcircuit.com/2013/07/sql-s ... -from.html

Re: M4Hesk Uninstaller

Posted: Tue Sep 28, 2021 11:37 pm
by mkoch227
You could try; however I cannot guarantee its result.

Re: M4Hesk Uninstaller

Posted: Fri Feb 11, 2022 2:11 pm
by afilincieri
Hi,
I followed the procedure but as soon as I go on uninstalling I get the error:

An error occurred! (Error Code: 1)
Could not execute query: ALTER TABLE `hesk_replies` DROP COLUMN `html`. MySQL said: Incorrect datetime value: '0000-00-00 00:00:00' for column 'dt' at row 62

How can I solve? Thank you.

Re: M4Hesk Uninstaller

Posted: Fri Feb 11, 2022 3:50 pm
by Klemen
Do you have phpMyAdmin (your hosting company should provide it)?

Try running this SQL code on your Hesk table:

Code: Select all

ALTER TABLE `hesk_replies` CHANGE `dt` `dt` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00';
ALTER TABLE `hesk_tickets` CHANGE `dt` `dt` timestamp NOT NULL DEFAULT '2000-01-01 00:00:00';

Re: M4Hesk Uninstaller

Posted: Fri Feb 11, 2022 4:36 pm
by afilincieri
Thanks! It's ok :)
But then I managed to update to hesk 3.0.0 and the update to the latest version 3.2.5 fails
I sent a request for help in the dedicated section of the forum.