AdvancedBan icon indicating copy to clipboard operation
AdvancedBan copied to clipboard

Show proper error message when reason too long

Open Comstepr opened this issue 4 years ago • 11 comments

What version of AdvancedBan (/AdvancedBan) are you using? 2.3.0

What kind of server do you have (Bungeecord/single server)?

Tuinity What server version (/version) are you using? Tuinity 1.16.3

Please provide the EXACT steps required to reproduce the problem... More than 100 characters in a ban reason will cause the ban to fail

Any error/log post it through pastebin.com and link it here. (Also include /plugins/AdvancedBan/logs/latest.log) Please check the plugins/AdvancedBan/logs/latest.log file and report this error in: https://github.com/DevLeoko/AdvancedBan/issues [10:11:50 INFO]: [AdvancedBan] An unexpected error has occurred executing an Statement in the database Please check the plugins/AdvancedBan/logs/latest.log file and report this error in: https://github.com/DevLeoko/AdvancedBan/issues [10:11:50 INFO]: [AdvancedBan] !! Not able to update ID of punishment! Please restart the server to resolve this issue! [10:11:50 INFO]: [AdvancedBan] !! Failed at: Punishment(name=redacted, uuid=REDACTEDUUIDHERE, operator=CONSOLE, calculation=, start=1604052710749, end=-1, type=BAN, reason=Griefing/taking things from others containers/unallowed modificaitons (Severity 5) [Issued by CONSOLE, id=-1)

Add any additional information below.

Comstepr avatar Oct 30 '20 02:10 Comstepr

Use message-layouts for longer reasons.

Will keep this open as a feature request to add a proper error message.

DevLeoko avatar Oct 30 '20 08:10 DevLeoko

Is there no way to increase the limit to 256 characters?

Comstepr avatar Oct 30 '20 23:10 Comstepr

You should be able to just do that through MySQL if you use MySQL. If you use local storage (HyperSQL) then that is currently not possible

DevLeoko avatar Oct 31 '20 20:10 DevLeoko

Okay thanks

Comstepr avatar Nov 02 '20 03:11 Comstepr

Still having issues. I am using MySQL and I am unable to ban for 100 chars

Comstepr avatar Nov 02 '20 03:11 Comstepr

I also can't seem to migrate HSQL to MySQL

Comstepr avatar Nov 02 '20 03:11 Comstepr

We currently don't provide any way of migrating from HSQL to MySQL or vice versa.

Did you manually adjust the size of the reason field in your MySQL punishment and punishment-history table?

DevLeoko avatar Nov 02 '20 08:11 DevLeoko

Nope.

Comstepr avatar Nov 02 '20 14:11 Comstepr

Well, you have to

DevLeoko avatar Nov 02 '20 17:11 DevLeoko

How?

Comstepr avatar Nov 04 '20 23:11 Comstepr

How?

You can do that through ALTER TABLE Punishments ALTER COLUMN reason VARCHAR (*enter your new length*)

And doing the same with the PunishmentsHistory (you may have to look what the tables are called again with SELECT *, not sure)

ALTER TABLE PunishmentsHistory ALTER COLUMN reason VARCHAR (*enter your new length*)

If you do not understand anything about altering the MySQL tables, then you should just use layouts.

Hopefuls avatar Nov 05 '20 06:11 Hopefuls