[Fixed] SMO room names can be made rediculously long

Information and error posts in regards to testing.
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
User avatar
foxfire667
Moderator
Posts: 557
Joined: Sat Sep 29, 2012 5:09 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

[Fixed] SMO room names can be made rediculously long

Postby foxfire667 » Tue Oct 16, 2012 7:54 pm

Since StepMania condenses this huge amount of text into the same amount of space, this isn't a huge issue in the SMO lobby. Where the issue really resides is on the SMO home page, where this text can be made to take up tons of space. This is a test I did earlier that shows how obnoxious this situation can be:

Image

I think the way to go about fixing this is by cutting off the name with an ellipsis after a certain amount of characters from the server. The name can stay very long in the lobby since it doesn't break anything by doing so, but letting rooms have the ability to spam the main page is a bit silly. It could look something along the lines of this:

Image

Anyway, hopefully this is something that is rather easy to fix, and something that can be implemented soon. I don't want to see the main page get flooded with spam titles in the future.

User avatar
blind
Posts: 157
Joined: Mon Oct 01, 2012 3:38 pm
Contact:

Re: SMO room names can be made rediculously long

Postby blind » Tue Oct 16, 2012 9:08 pm

This is great news. I'm writing novels for room names/descriptions now.
First to get 1,000,000 xp.
R.I.P. first place. :(

User avatar
Izzy
Moderator
Posts: 531
Joined: Thu Sep 27, 2012 3:03 pm
Location: Leawood, Kansas
Contact:

Re: SMO room names can be made rediculously long

Postby Izzy » Tue Oct 16, 2012 9:10 pm

The data type of the room name in the database might be something like "char 100". You might be able to just set it to "char 20". I don't really know what would happen if you tried setting a char 20 type to a string that has 100 characters though. But if it crashes than you could just use some type of substring method to cut it to size.

User avatar
Angelo
Posts: 72
Joined: Sat Oct 06, 2012 4:31 am
Location: The Netherlands
Contact:

Re: SMO room names can be made rediculously long

Postby Angelo » Tue Oct 16, 2012 11:20 pm

Izzy, current rooms are not stored in the database, they're fetched via the RTS system.

I'm not sure whether it's a good idea to change this in the server code or in the web code. Both would work, really.
- Angelo
developer

User avatar
Izzy
Moderator
Posts: 531
Joined: Thu Sep 27, 2012 3:03 pm
Location: Leawood, Kansas
Contact:

Re: SMO room names can be made rediculously long

Postby Izzy » Tue Oct 16, 2012 11:45 pm

I see, I guess that would be a pointless amount of queries for such short term storage.

I think it makes more sense to limit it on the website only.

User avatar
Cube
Site Admin
Posts: 354
Joined: Mon Sep 24, 2012 10:18 am
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SMO room names can be made rediculously long

Postby Cube » Wed Oct 17, 2012 1:56 am

I'll just update it in the web code. One second please...

User avatar
foxfire667
Moderator
Posts: 557
Joined: Sat Sep 29, 2012 5:09 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Re: SMO room names can be made rediculously long

Postby foxfire667 » Wed Oct 17, 2012 3:59 pm

Looks like this bug is completely resolved:
Image

Graveyard time. Thanks Cube!


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “Bug Reports ONLY”

Who is online

Users browsing this forum: No registered users and 10 guests