Unused prefix in generated name #130

Closed
opened 2026-02-04 16:50:09 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @rmartinoscar on GitHub (Jul 12, 2024).

Current Behavior

The $prefix (egg name) is not used in the random name generator of CreateServer because egg is selected later so it will only take effect if you set the egg then compe back to the first step

CreateServer.php

Expected Behavior

The egg should be set to the first one it finds so when you generate a name its EggName-RandomWord

Steps to Reproduce

Create a server, generate a random name then go to the egg section, select any go back and regen the name

Panel Version

1.0.0-beta6

Wings Version

1.0.0-beta3

Games and/or Eggs Affected

No response

Docker Image

No response

Error Logs

No response

Is there an existing issue for this?

  • I have searched the existing issues before opening this issue.
  • I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server.
  • I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
Originally created by @rmartinoscar on GitHub (Jul 12, 2024). ### Current Behavior The $prefix (egg name) is not used in the random name generator of CreateServer because egg is selected later so it will only take effect if you set the egg then compe back to the first step [CreateServer.php](https://github.com/pelican-dev/panel/blob/main/app/Filament/Resources/ServerResource/Pages/CreateServer.php#L56) ### Expected Behavior The egg should be set to the first one it finds so when you generate a name its EggName-RandomWord ### Steps to Reproduce Create a server, generate a random name then go to the egg section, select any go back and regen the name ### Panel Version 1.0.0-beta6 ### Wings Version 1.0.0-beta3 ### Games and/or Eggs Affected _No response_ ### Docker Image _No response_ ### Error Logs _No response_ ### Is there an existing issue for this? - [X] I have searched the existing issues before opening this issue. - [X] I have provided all relevant details, including the specific game and Docker images I am using if this issue is related to running a server. - [X] I have checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
Author
Owner

@notAreYouScared commented on GitHub (Jul 13, 2024):

$prefix = $egg ? str($egg->name)->lower()->kebab() . '-' : '';

This line is saying if no egg, return '', if egg kebab it eggname-{random bird name}

Working as intended.

@notAreYouScared commented on GitHub (Jul 13, 2024): ```php $prefix = $egg ? str($egg->name)->lower()->kebab() . '-' : ''; ``` This line is saying if no egg, return `''`, if egg kebab it `eggname-{random bird name}` Working as intended.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/panel#130