Project

General

Profile

Actions

Bug #830

closed

Service provider information should be saved

Added by Chris Buechler over 14 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
PPP Interfaces
Target version:
Start date:
08/20/2010
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

Previously configured Service Provider information is not displayed when an interface configuration is edited after saving a previous configuration. This is because it isn't stored in the config, and it should be.

Actions #1

Updated by Marcus Brown over 14 years ago

I tried and tried to figure out what was causing #1 but never could find it. :(
I'll work on #2.

Actions #2

Updated by Jim Pingle over 14 years ago

#1 is a common problem in the GUI, almost 15-20 pages have the issue and two of those files are pkg_edit.php and wizard.php so it affects all packages and wizards too. It should probably have its own ticket.

There is some code (somewhere, perhaps prototype/scriptaculous?) that does the formatting properly only if the field has an id of passwordfld. Most others just use the class .pwd, not the ID. In pages that don't already use the id field on the password input, the easy fix is just to add id="passwordfld" to the input tag for the password.

Actions #3

Updated by Scott Ullrich almost 14 years ago

  • Target version changed from 2.0 to 2.1

I just spent some considerable time on #2 and had no luck. Both Ermal and myself agree that this is not doable without some kind of large rewrite. Targeting 2.1.

Actions #4

Updated by Chris Buechler almost 14 years ago

  • Subject changed from PPP screen cosmetic issues to Service provider information should be saved
Actions #5

Updated by Chris Buechler over 12 years ago

  • Status changed from New to Assigned
  • Assignee set to Darren Embry
Actions #6

Updated by Darren Embry over 12 years ago

  • Status changed from Assigned to Feedback

I guess you're talking about Service Provider stuff under PPP configuration when you select PPP as an IPv4 configuration type.

When I do the following:
- use Interfaces:(assign) to create OPT3 on usb
- go to Interfaces:OPT3
- select enable
- change IPv4 config type to PPP
- Service Provider country field has no options (that's another bug probably but neither here nor there)
- Fill in username, password, phone#, apn
- Click Save

the data is stored in /cf/conf/config.xml:

        <ppps>
                <ppp>
                        <ptpid>0</ptpid>
                        <type>ppp</type>
                        <if>ppp0</if>
                        <ports>/dev/cuau0</ports>
                        <username>username2</username>
                        <password>cGFzc3dvcmQy</password>
                        <phone>50255512122</phone>
                        <apn>apn2</apn>
                </ppp>
        </ppps>

Am I missing something?

Actions #7

Updated by Chris Buechler over 12 years ago

  • Status changed from Feedback to New

correct, but when you go back to that screen it loses which "Service Provider" entry you actually picked. eg if I pick United States, Verizon, Verizon - CDMA, when I edit that it should fill the country, provider, plan in the way they were originally picked.

also I noted if you pick United States in the Country drop down, it fills in a bunch of garbage in the Provider drop down (like "function detect (iterator, context) { var ..."), please fix that while you're at it.

Actions #8

Updated by Darren Embry over 12 years ago

I don't even get the countries filled in. /getserviceproviders.php yields a 500. Apparently this core dump. I'll see if I can fix this.

kernel: pid 49800 (php), uid 0: exited on signal 11 (core dumped)

Actions #9

Updated by Darren Embry over 12 years ago

failing somewhere in this call:

$serviceproviders_attr = xml2array($serviceproviders_contents,1,"attr");
Actions #10

Updated by Darren Embry over 12 years ago

the statement

extract($data);

is failing in the first iteration in the main loop of xml2array.
output of var_export($data) looks innocent, even:
array (
  'tag' => 'serviceproviders',
  'type' => 'open',
  'level' => 1,
  'attributes' =>
  array (
    'format' => '2.0',
  ),
)

Actions #11

Updated by Darren Embry over 12 years ago

05:28:23 < databeestje_> cmb: eri-- : dsevil : the core dump with xml2array() in combination with php 5.3 was caused by a out of date suhosin patch, Warren resolved the issue. If this is a old snap, as in binaries, then it will probably be that.
05:28:37 < databeestje_> rrd upgrade doesn't kill it anymore so i would consider it fixed.

Actions #12

Updated by Darren Embry over 12 years ago

In latest pfSense snapshot, I'm not seeing this error that Chris reported:

also I noted if you pick United States in the Country drop down, it fills in a bunch of garbage in the Provider drop down (like "function detect (iterator, context) { var ..."), please fix that while you're at it.

I have noticed however that the APN values are not necessarily unique within a provider, unfortunately. One of the big three providers in the USA has two "ISP.CINGULAR" values:

<select class="formselect" name="providerplan" id="providerplan" onchange="prefill_provider()">
<option></option>
<option value="ISP.CINGULAR">Data Connect (Accelerated) - ISP.CINGULAR</option>
<option value="ISP.CINGULAR">Data Connect - ISP.CINGULAR</option>
<option value="WAP.CINGULAR">MEdia Net - WAP.CINGULAR</option>
</select>

I'm pretty sure this just means we need to also save the <name> along with the value="..." attribute of the <apn>. Can someone tell me if it WON'T be safe to also have that in the <option> value like below?

<select class="formselect" name="providerplan" id="providerplan" onchange="prefill_provider()">
<option></option>
<option value="ISP.CINGULAR&#8;Data Connect (Accelerated)">Data Connect (Accelerated) - ISP.CINGULAR</option>
<option value="ISP.CINGULAR&#8;Data Connect">Data Connect - ISP.CINGULAR</option>
<option value="WAP.CINGULAR&#8;MEdia Net">MEdia Net - WAP.CINGULAR</option>
</select>

(&#8; is a tab, I chose it as a separator because it's not going to show up in a value)

Actions #13

Updated by Chris Buechler over 12 years ago

  • Status changed from New to Closed

that other issue is fixed, and this original one, it's way more trouble than it's worth.

Actions

Also available in: Atom PDF