Hello all,
This is most likely the weirdest error I've seen in NAV so far, and I can't really seem to trace where the "hidden" value is hiding. When I go to Reports, All IP Devices -> Advanced Search and put "Breivika" in the Location field and click search, I get the following SQL error:
Configuration error! The report generator is not able to do such things. ERROR: column "r4g3n53nd" does not exist SELECT locationid,roomid,sysname,ip,catid,sub,typeid,typename,orgid,netbox.up,modules,swport,gwport,prefixcount,CASE WHEN Mem THEN 'Mem' ELSE NULL END AS Mem,snmp,sw_ver AS Software,serial,val AS Function,netbox.netboxid,prefixid FROM type RIGHT OUTER JOIN netbox USING (typeid) LEFT JOIN room USING (roomid) LEFT JOIN (SELECT netboxid,count(netboxid) AS gwport FROM gwport JOIN module USING (moduleid) GROUP BY netboxid) tempaggr1 USING (netboxid) LEFT JOIN (SELECT netboxid,count(netboxid) AS swport FROM swport JOIN module USING (moduleid) GROUP BY netboxid) tempaggr2 USING (netboxid) LEFT JOIN (SELECT netboxid,count(netboxid) AS modules FROM module GROUP BY netboxid) tempaggr3 USING (netboxid) LEFT JOIN (SELECT netboxid,count(netboxid) AS sub FROM netboxcategory GROUP BY netboxid) tempaggr4 USING (netboxid) LEFT JOIN (SELECT netboxid,count(netboxid) AS snmp FROM netboxsnmpoid GROUP BY netboxid) tempaggr5 USING (netboxid) LEFT JOIN (SELECT netboxid, count(netboxid) > 0 AS Mem FROM mem GROUP by netboxid) tempaggr6 USING (netboxid) LEFT JOIN (SELECT netboxid, count(gwportid) AS prefixcount FROM gwportprefix JOIN gwport USING (gwportid) JOIN module USING (moduleid) GROUP BY netboxid) tempaggr7 USING (netboxid) LEFT JOIN device ON (netbox.deviceid=device.deviceid) LEFT JOIN netboxinfo ON (netbox.netboxid=netboxinfo.netboxid AND var='function') WHERE r4g3n53nd = 'Search' AND locationid = 'Breivika' ORDER BY locationid,roomed
I have no idea whatsoever where it is getting "r4g3n53nd". It looks like a password of some kind, but I can't find it in report.conf or front.html.
Does anyone have a clue why I get this error? I am not able to reproduce the same error while using Mozilla Firefox.
Any help appreciated :-)
------------------------------------------------------ Vidar Stokkenes Networking Consulant Networking and telecom Department HN IKT - Tromsø
Tlf: 76 16 61 87 / 77 66 99 55 Cell: 95 87 99 42 e-mail: vidar.stokkenes@hn-ikt.no
Before printing, think about the environment
On Mon, 30 Mar 2009 11:02:32 +0200 Stokkenes Vidar Vidar.Stokkenes@hn-ikt.no wrote:
I have no idea whatsoever where it is getting "r4g3n53nd". It looks like a password of some kind, but I can't find it in report.conf or front.html.
It is some sort of ancient, internal debugging-thingy in the report code.
The important questions are:
1. What version of NAV are you running? 2. What is the URI when you get this error? 3. Am I correct in assuming what you are using a custom-modified IP Device Report (since there is no Location field in the default one)?
-----Original Message----- From: Morten Brekkevold [mailto:morten.brekkevold@uninett.no] Sent: 30. mars 2009 11:34 To: Stokkenes Vidar Cc: 'nav-users@uninett.no' Subject: Re: Weird Report behaviour in Internet Explorer
The important questions are:
- What version of NAV are you running?
NAV 3.5.0 (Debian repository)
- What is the URI when you get this error?
The search URI looks as following when I am using Internet Explorer:
https://nav.domain.fqdn/report/netbox?r4g3n53nd=Search&op_locationid=eq&...
This is also the URI generating the quoted SQL error.
The search URI looks as following when I am using Mozilla Firefox:
https://nav.domain.fqdn/report/netbox?op_locationid=eq&locationid=Breivi...
This works as expected, and shows the expected output.
- Am I correct in assuming what you are using a custom-modified IP Device Report (since there is no Location field in the default one)?
That is indeed correct. We added "Location" to the default netbox views in report.conf, as that is the most accurate "Area" variable we can search for (we don't operate with rooms much)
Now why would Mozilla Firefox and Internet Explorer handle the two Advanced Search function differently? As it seems to work flawless in Mozilla Firefox.
-Vidar
Correction, the Internet Explorer URI is:
https://nav.domain.fqdn/report/netbox?r4g3n53nd=Search&op_locationid=eq&...
-Vidar
On Mon, 30 Mar 2009 11:48:36 +0200 Stokkenes Vidar Vidar.Stokkenes@hn-ikt.no wrote:
The search URI looks as following when I am using Internet Explorer:
https://nav.domain.fqdn/report/netbox?r4g3n53nd=Search&op_locationid=eq&...
This is also the URI generating the quoted SQL error.
The search URI looks as following when I am using Mozilla Firefox:
https://nav.domain.fqdn/report/netbox?op_locationid=eq&locationid=Breivi...
This works as expected, and shows the expected output.
Now why would Mozilla Firefox and Internet Explorer handle the two Advanced Search function differently? As it seems to work flawless in Mozilla Firefox.
The submit button is named 'r4g3n53nd'. IE will submit the text of this button as the value of the r4g3n53nd field, while Firefox appears to ignore it.
I'm surprised that no-one has reported this one sooner. This appears to have been fixed on the default branch, though, but not on the 3.5.x branch. You should file this as a bug on Launchpad; I'm Cc'ing the current maintainer of the report code.
-----Original Message----- From: Morten Brekkevold [mailto:morten.brekkevold@uninett.no] Sent: 30. mars 2009 12:06 To: Stokkenes Vidar Cc: 'nav-users@uninett.no'; Jørgen Abrahamsen Subject: Re: Weird Report behaviour in Internet Explorer
I'm surprised that no-one has reported this one sooner. This appears to have been fixed on the default branch, though, but not on the 3.5.x branch. You should file this as a bug on Launchpad; I'm Cc'ing the current maintainer of the report code.
I submitted a bug onto the launchpad bugtracker https://bugs.launchpad.net/nav/+bug/351499.
Please note that I pasted the wrong debug code for the scenario in my first post. I pasted the correct debug error (for the given scenario) in my last comment in the bug.
-Vidar
On Mon, 30 Mar 2009 12:27:59 +0200 Stokkenes Vidar Vidar.Stokkenes@hn-ikt.no wrote:
I submitted a bug onto the launchpad bugtracker https://bugs.launchpad.net/nav/+bug/351499.
Please note that I pasted the wrong debug code for the scenario in my first post. I pasted the correct debug error (for the given scenario) in my last comment in the bug.
No problem. You should be able to update the original bug description and title, though (I haven't tried this as a non-privileged tracker user, I'm just assuming you have access to this since you are the bug reporter).