[GH-ISSUE #125] An error occurs when nameserver is empty and click save #83

Closed
opened 2026-02-26 17:31:18 +03:00 by kerem · 0 comments
Owner

Originally created by @Koyorice on GitHub (Dec 7, 2024).
Original GitHub issue: https://github.com/ConvoyPanel/panel/issues/125

Current Behavior

This error occurs when the user deletes all nameservers and presses Save

[2024-12-06 15:27:33] production.ERROR:  {"userId":1,"exception":"[object] (Illuminate\\Support\\ItemNotFoundException(code: 0):  at /var/www/convoy/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:1296)
[stacktrace]
#0 /var/www/convoy/app/Services/Servers/CloudinitService.php(49): Illuminate\\Support\\Collection->firstOrFail()

Expected Behavior

Save the nameserver normally when it is empty

Steps to Reproduce

Add a nameserver to the vm and click delete after saving to save again.

Screenshots

No response

Proxmox OS Version

7.4

Operating System

Ubuntu 24.04

Browser

Chrome 129

Additional Context

https://github.com/ConvoyPanel/panel/blob/develop/app/Services/Servers/CloudinitService.php#L49-L51

Maybe change to

$nameservers = collect($this->configRepository->setServer($server)->getConfig())->where('key', '=', 'nameserver')->first();

return $nameservers ? explode(' ', $nameservers['value']) : [];

Panel Version

4.2.4

Error Logs

No response

Is there an existing issue for this?

  • I have searched the existing issues before opening this issue.
  • 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 @Koyorice on GitHub (Dec 7, 2024). Original GitHub issue: https://github.com/ConvoyPanel/panel/issues/125 ### Current Behavior This error occurs when the user deletes all nameservers and presses Save ``` [2024-12-06 15:27:33] production.ERROR: {"userId":1,"exception":"[object] (Illuminate\\Support\\ItemNotFoundException(code: 0): at /var/www/convoy/vendor/laravel/framework/src/Illuminate/Collections/Collection.php:1296) [stacktrace] #0 /var/www/convoy/app/Services/Servers/CloudinitService.php(49): Illuminate\\Support\\Collection->firstOrFail() ``` ### Expected Behavior Save the nameserver normally when it is empty ### Steps to Reproduce Add a nameserver to the vm and click delete after saving to save again. ### Screenshots _No response_ ### Proxmox OS Version 7.4 ### Operating System Ubuntu 24.04 ### Browser Chrome 129 ### Additional Context https://github.com/ConvoyPanel/panel/blob/develop/app/Services/Servers/CloudinitService.php#L49-L51 Maybe change to ``` $nameservers = collect($this->configRepository->setServer($server)->getConfig())->where('key', '=', 'nameserver')->first(); return $nameservers ? explode(' ', $nameservers['value']) : []; ``` ### Panel Version 4.2.4 ### 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 checked in the Discord server and believe this is a bug with the software, and not a configuration issue with my specific system.
kerem 2026-02-26 17:31:18 +03:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/panel#83
No description provided.