Broken Web-Chargen after Demographics Change

I did a fresh install (thinking maybe I broke something somewhere else), and found this bug consistently.

I edited demographics.yml (both from the web admin and the raw file) to say:

Faction:
  desc: Military faction.
  values:
    Test: test
    Marines: Semper fi.

Now, my online chargen gives me the “Oops! Something went wrong” error.

If I put it back to the default, it works fine.

Using Digital Ocean’s Ubuntu 16.04.4 x 64.

1 Like

Thanks for the bug report.

It’s a problem with the Ranks plugin. There are no valid ranks for the Test faction.

I will fix that in the next patch. In the mean time you have a few options:

  • If you’re not planning on using ranks, you can disable the Ranks plugin as explained here.
  • You can edit the ranks.yml file to add some ranks for your Test faction as explained here.
  • You can patch the bug yourself. The offending line of code is this one in plugins/ranks/helpers.rb.

Change it from:

return nil if !config

to

return if !config

Let me know if none of those options help.

1 Like

Thanks for the response!

Disabling the plugin worked, as did adding ranks per faction as suggested.

I then went on to create a new problem: If you leave a group setting blank, it causes the same error.

Test:
  desc: Testing blanks.

I actually get the “Oops!” error twice when I reload web-chargen after that.

That’s not a valid configuration. You can’t have a group with no values.

When there are problems with a config file, you’ll get the “Ooops” error when the game tries to use that configuration. If you go to the [game log(https://aresmush.com/tutorials/code/logs/), it should give you a file and line number to help you begin troubleshooting. You’re also welcome to post the errors here if you’re having trouble figuring out what’s wrong.

In a perfect world, the game would do all kinds of error-checking to ensure there are no problems with the config file. But with hundreds of config options and tons of different permutations that often depend on one another - that would be a giant project. Maybe someday!

1 Like

Understood! I had a feeling it might not be an option.

I read you were still updating the tutorials, so I’ll add it here: https://www.aresmush.com/tutorials/config/demographics/

If you omit the values, the group will be freeform, allowing the player to specify any value they want. This is commonly used for Position if you don’t have a fixed list of available positions but still want Position to show up in census and whatnot like the other groups.

Thanks again for your help!

Ooops! You’re right - I forgot about that feature. That sentiment is not really supported by the web portal out of the box, so I’ll have to fix either the portal or the documentation. Thanks.

1 Like