th3-z / kf2-magicked-admin

:spider: Mutator-free management, statistics, and in-game bot for ranked Killing Floor 2 servers
https://kf2-ma.th3-z.xyz
MIT License
32 stars 7 forks source link

[ENHANCEMENT] Killinuxfloor compatibility #183

Closed xadips closed 1 year ago

xadips commented 3 years ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Ran magicked admin from python sources

Expected behavior I expected it to work installed it and ran it from python sources, launched to proceed with the first time setup after inputting the variables I get an error.

Desktop (please complete the following information):

Server (please complete the following information):

Log

Traceback (most recent call last):
  File "magicked_admin/magicked_admin.py", line 208, in <module>
    application.run()
  File "magicked_admin/magicked_admin.py", line 150, in run
    server = self.make_server(server_name)
  File "magicked_admin/magicked_admin.py", line 94, in make_server
    web_admin = WebAdmin(web_interface, chat)
  File "/home/o0d4/kf2-magicked-admin/magicked_admin/web_admin/web_admin.py", line 24, in __init__
    self.__web_interface.get_payload_map_settings()
  File "/home/o0d4/kf2-magicked-admin/magicked_admin/web_admin/web_interface.py", line 447, in get_payload_map_settings
    mutator_count = map_tree.xpath(mutator_count_pattern)[0]
IndexError: list index out of range
th3-z commented 3 years ago

Hi, are you launching with a custom map? I have seen issues with misconfigured maps causing something similar. Try running kf2-ma with a default map loaded.

The last update made some changes to the web admin panel too, it could also be that. I'll take a closer look later today.

Thanks,

z

-------- Original Message -------- On 16 Dec 2020, 17:13, Spidax wrote:

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  • Ran magicked admin from python sources

Expected behavior I expected it to work installed it and ran it from python sources, launched to proceed with the first time setup after inputting the variables I get an error.

Desktop (please complete the following information):

  • OS: CentOS 7 minimal
  • KF2-MA version: 0.16
  • Language: en_GB

Server (please complete the following information):

  • Mods: MaxPlayers, ClassicScoreboard, DisplayDamage
  • Web admin resource modifications: No only installed using killinuxfloor
  • Applied web-admin patches: no

Log

Traceback (most recent call last): File "magicked_admin/magicked_admin.py", line 208, in application.run() File "magicked_admin/magicked_admin.py", line 150, in run server = self.make_server(server_name) File "magicked_admin/magicked_admin.py", line 94, in make_server web_admin = WebAdmin(web_interface, chat) File "/home/o0d4/kf2-magicked-admin/magicked_admin/web_admin/web_admin.py", line 24, in init self.__web_interface.get_payload_map_settings() File "/home/o0d4/kf2-magicked-admin/magicked_admin/web_admin/web_interface.py", line 447, in get_payload_map_settings mutator_count = map_tree.xpath(mutator_count_pattern)[0] IndexError: list index out of range

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

xadips commented 3 years ago

I'm launching on BioticsLab, I do have custom maps installed though

th3-z commented 3 years ago

The problem is that it's not find the following line on your change map page. It's definitely not related to a misconfigured map.

<input type="hidden" name="mutatorGroupCount" value="0" />

I just checked the stock files and this should still be there around line 122. I'm guessing that one of your mutators or killinuxfloor has affected this. There isn't too much I can do about it when the webadmin panel has unexpected changes. If you view source on the change map page and search for "mutatorGroupCount" you might find something helpful.

Alternatively you might try editing this line in the source code, I would just hardcode it as mutator_count = 3.

The MaxPlayers and ClassicScoreboard mutators are know to work with kf2-ma so you might try without killinuxfloor or DamageDisplay to narrow down the cause.

th3-z commented 3 years ago

I just had a closer look at killinuxfloor and noticed something. In this screenshot from their documentation I can see there is a section removed. The removed section is where I would normally expect to see the line I quoted above.

You might be able to restore the section by replacing the template for this page with a stock one. However I'm not entirely sure what killinuxfloor does or how this might affect it.

th3-z commented 3 years ago

https://github.com/noobient/killinuxfloor/blob/master/roles/install/files/serveradmin.patch#L9

This line in killinuxfloor is causing your problem, it comments out the relevant field, effectively removing it from the document tree.

xadips commented 3 years ago

How would I go about fixing, in which file is the line I need to replace?

th3-z commented 3 years ago

This is a compatibility issue so it can be solved on either side. Since it was raised here and you're running kf2-ma from source I'd recommend that you go with editing the line I referred to in my second reply and see how it responds.

I think the relevant file is KFGame/Web/ServerAdmin/current_change.html. Restoring this to stock may solve the problem also.

I'll make consideration for this in the next release. If it's something fairly simple to work around I'll do so. For now the solution will require a bit of manual work here.

There's definitely a way around this issue, if you need more detailed help add me on Steam.

xadips commented 3 years ago

Yeah it works fine now, I've hardcoded it and there are no errors since mutator_count = 3