• October 24, 2020, 10:21:46 PM
Welcome, Guest. Please login or register. Registration is free.
Did you miss your activation email?

Author Topic: Wings 5.5  (Read 2138 times)

0 Members and 1 Guest are viewing this topic.

Offline newdud

  • Jr. Member
  • **
  • Posts: 30
Wings 5.5
« on: October 08, 2015, 10:39:41 AM »
We recentley upgarded to WiNGS 5.5 and started to get the "Error “Query Variable Qv not found” error
I looked up Release Notes and amended the html files on the Capative Portal.

This is what the lines looks like on login.html & welcome.html  "var vars = query.split(/[?&]/);" but am still getting the error. What am I doing wrong ? Help  :-\



Offline noobie

  • Full Member
  • ***
  • Posts: 92
Re: Wings 5.5
« Reply #1 on: October 08, 2015, 03:33:51 PM »
it works for me with the Qv..

can you share you captive portal policy config? (just change the external web pages URLs)

Offline McNulty

  • Sr. Member
  • ****
  • Posts: 217

Offline newdud

  • Jr. Member
  • **
  • Posts: 30
Re: Wings 5.5
« Reply #3 on: October 09, 2015, 08:38:22 AM »
Attached are the CP config and the HTML files in full.
If someone can point me in the right direction than that would be most helpful.

Offline noobie

  • Full Member
  • ***
  • Posts: 92
Re: Wings 5.5
« Reply #4 on: October 13, 2015, 08:30:12 AM »
Below is your code. It will send alerts all the time, since the alert string in your code is after the for function, but its just part of the qetQueryVariable function, thats why you are seeing it:

//Function to get param value from URL.
function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split(/[?&]/);
  for (var i=0;i<vars.length;i++) {
    var pair = vars.split("=");
    if (pair[0] == variable) {
        if (pair[0] == "Qv") {
            return vars.substr(3, vars.length);
        }
        return pair[1];
    }
  }
  alert('Query Variable ' + variable + ' not found');
}


this is how it should be (taken from the internal page generated by my controller):

function getQueryVariable(variable) {
  var query = window.location.search.substring(1);
  var vars = query.split(/[?&]/);
  for (var i=0;i<vars.length;i++) {
    var pair = vars.split("=");
    if (pair[0] == variable) {
        if (pair[0] == "Qv") {
            return vars.substr(3, vars.length);
        }
        return pair[1];
    }
  }
  return "";
}