Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong variable for DNS-Serverlist #994

Closed
SephGER opened this issue Aug 25, 2021 · 3 comments
Closed

Wrong variable for DNS-Serverlist #994

SephGER opened this issue Aug 25, 2021 · 3 comments

Comments

@SephGER
Copy link

SephGER commented Aug 25, 2021

<?php foreach ($upstreamServers as $server): ?>

The list of DNS-Servers doesn't load for me. After changing $upstreamServers to $conf['server'] it works.

@billz
Copy link
Member

billz commented Aug 25, 2021

This var is, or should be, set here:

$upstreamServers = is_array($conf['server']) ? $conf['server'] : [ $conf['server'] ];

You can help our devs diagnose this by using the issue template, as described below. Otherwise we’re building a test case with no steps to repro, etc.
https://docs.raspap.com/issues/

@SephGER
Copy link
Author

SephGER commented Aug 26, 2021

After adding DNS-Servers to the dhcp-Config I can't see them on the page.

Checklist

  • This is a bug report
  • I have searched this repository for existing issues
  • I checked the FAQ and official documentation before creating this issue
  • I have read and understand the issue reporting guidelines

Bug description

Your environment

  1. Operating System: RPi OS 32-bit Lite
  2. Hardware and version: RPi4B
  3. RaspAP version: v2.6.6
  4. Followed the project prerequisites? Yes
  5. RaspAP Quick Install or Manual setup? Quick Install
  6. Using default configuration? No
  7. Simultaneous AP and managed mode? No
  8. Onboard wireless chipset or external adapter? Onboard
  9. Other software or services running with RaspAP? Own openVPN

Steps to reproduce

If I add DNS-Servers on the DHCP->Advanced page, they are written into the 090_wlan0.conf but not shown on the page.
After changing the $upstreamServers variable to $conf['server'] in the template file, the servers are shown.

<?php foreach ($upstreamServers as $server): ?>

Also in line 10 it is also using the $conf array:
<input class="custom-control-input" id="no-resolv" type="checkbox" name="no-resolv" value="1" <?php echo $conf['no-resolv'] ? ' checked="checked"' : "" ?> aria-describedby="no-resolv-description">

It seems that the get_netcfg only sets the variables in this php file but returns the data via ajax as json. After that it is only written in the $conf array.

@billz billz closed this as completed in c241040 Sep 7, 2021
@billz
Copy link
Member

billz commented Sep 7, 2021

@SephGER thanks for reporting. I've mentioned you in the commit msg

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants