When I go to <root>/phpESP/public/dashboard.php, I get the following error below the Login box where the list of survey's should be:
--------------------------------
Notice: Undefined index: superuser in /nfs/c01/h05/mnt/37168/domains/remedy.fm/html/phpESP/admin/include/lib/espsurvey.inc on line 156
Notice: Undefined index: pall in /nfs/c01/h05/mnt/37168/domains/remedy.fm/html/phpESP/admin/include/lib/espsurvey.inc on line 158
Notice: Undefined index: pdata in /nfs/c01/h05/mnt/37168/domains/remedy.fm/html/phpESP/admin/include/lib/espsurvey.inc on line 158
Warning: array_intersect() [function.array-intersect]: Argument #1 is not an array in /nfs/c01/h05/mnt/37168/domains/remedy.fm/html/phpESP/admin/include/lib/espsurvey.inc on line 158
Notice: Undefined index: username in /nfs/c01/h05/mnt/37168/domains/remedy.fm/html/phpESP/admin/include/lib/espsurvey.inc on line 162
----------------------------------------
I can't figure out what is wrong and why this is erroring out.
Has anyone else had the same problem?
Email: Nick@remedy.fm
Thanks,
Nick
Logged In: NO
Update... Nick here...
I just noticed when I log in the admin panel side, then go to <root>/phpESP/public/dashboard.php, it shows the list of surveys that are available to take. However, when I sign out and then go to the page, i get the error. I'd like the list of surveys to show when the user is not logged in. Thanks!
Logged In: YES
user_id=14116
Originator: NO
These are notices and warnings, which technically we/phpESP should not be producing, but I think if you stop them from being sent to the browser the dashboard should work.
Logged In: YES
user_id=1982963
Originator: NO
Since I wrote the code, I'll comment:
The underlying reason is that the public authentication code is a) working in the same session space as the administrator code, and b) is not filling in all the capabilities information administration side needs. This occurs only in the case when the same person is bouncing between the administration and public sides of phpESP, which is a rare case.
I am tracking this as a FIXME, but since it affects such a small segment of the population (I believe) it has a low priority. Votes to increase the priority are welcome.
As far as the request to show surveys when not logged in, that is not a feature of the dashboard, but could be one: open a new ticket. As far as functionality, describe what you'd like to see in that new ticket: perhaps just the public surveys?
Logged In: NO
greggmc,
how do i stop these warnings from being sent?
i just want the public surveys to show upon arriving at the page.
thanks.
Logged In: YES
user_id=14116
Originator: NO
As bishopb mentioned....
"As far as the request to show surveys when not logged in, that is not a
feature of the dashboard, but could be one: open a new ticket. As far as
functionality, describe what you'd like to see in that new ticket: perhaps
just the public surveys?"
That simply isn't what the dashboard does. You change the way errors/warnings/notices are displayed in your php.ini.
Logged In: YES
user_id=14116
Originator: NO
Whoops forgot bishop was tracking... re-opened.
Logged In: NO
nick here...
okay, i understand now.
i'll write some SQL code on a new page and connect to my database.
Something like:
$SQL = "SELECT * FROM phpESP_survey WHERE public = 'Y'";
Then loop through the rows.
Display the title with the link: <root>/phpESP/survey.php?name=<name>
Hope this sounds okay to do...
Logged In: YES
user_id=1982963
Originator: NO
Nick: I actually just reviewed my code, and I think the support you requested is already available. In the configuration file, there is a directive called "dashboard_show_public_surveys". Set that to true (the default is false). You should then get the list of public surveys, as well as the option to log in.
As far as the errors go, set display_errors and display_startup_errors to off in your php.ini file. The scope of this ticket remains to address the root cause of these tickets.
Logged In: NO
nick here, again...
what you don't understand, is that i DO have the"dashboard_show_public_surveys" set to true. And when i go to the page, i get the error listed above in the original question and not a list of the public surveys.
Logged In: YES
user_id=1982963
Originator: NO
These errors occur when you have logged in as an admin, then go to the public side and do something. As far as I know, there are two ways to get rid of the errors: 1) log in on the public side, 2) erase the session files. Do one of those, then you should get the list of public surveys without the errors.
Logged In: YES
user_id=109671
Originator: NO
I have to say: I can't reproduce this: I have enabled the dashboard and the public survey shows up on the dashboard. I enabled all possible php errors to show up, but nothing: not in the logfile, nor on screen. For the record: I tried this with a freshly started browser where I didn't log in to any part of the admin interface ...
Franky
Is this still valid?
I believe it's still valid, as I know it was a problem, and I've not put in a fix for it. Since it impacts only the administrator, and there is an easy, but annoying, workaround, it's definitely not a hot item.