[jifty-devel] Admin mode breaks application.
Mat Brletic
mbrletic at visalia.k12.ca.us
Tue May 23 14:27:32 EDT 2006
Hello,
A few days ago, I had a simple Jifty app working ok. I then went on to
re-compile Apache to use mod_auth_ldap. When I tried to run the
application again, I found that it did not work. I will paste the code
below:
--------------------------------------------------------------------
code begins below
<&|/_elements/wrapper, title => Jifty->config->framework('Survey3') &>
% my $answers = Survey::Model::AnswerCollection->new();
% $answers->unlimit();
% my $next_answer_id = 0;
% my $surveys = Survey::Model::SurveyCollection->new();
% $surveys->unlimit();
% my $next_survey_id = 0;
% my $action = 'test_Answer_Survey.pm';
% while (my $answer = $answers->next) {
Survey: <% $answer->survey %>
Answer ID: <% $answer->id %>
Answer: <% $answer->answer %><br>
% $next_answer_id = $next_answer_id + 1;
% }
%####################################################
% while (my $survey = $surveys->next) {
Survey ID: <% $survey->id %>
Ticket # <% $survey->ticket %>
Queue: <% $survey->queue %><br>
% $next_survey_id = $next_survey_id + 1;
% }
%####################################################
% $next_answer_id = $next_answer_id + 1;
The next available survey ID number is : <% $next_survey_id %><br>
The next available answer ID number is : <% $next_answer_id %><br>
Please answer a few question about <b>Ticket # <% $ticket %></b> concerning
Subject: <b><% $subject %></b><br>
----------------------------------------------------------
----------------------------------------------------------
%#########################################################
<FORM ACTION="test_Answer_Survey.pm">
<<<<< removed for brevity, this was not part of problem>>>
<INPUT TYPE=SUBMIT VALUE="Submit Survey">
</FORM>
</&>
%#########################################################
<%args>
$ticket => ''
$subject => ''
$cue => ''
</%args>
-------------------------------------------- end of code
What was happening was that Neither of the loops would run. The "next
available" survey id and answer id would be 0 and 1, when they should
have been much higher. It looked like local variables were not loading
anything from the collection objects.
Finally, I re-enable the Administration mode in config.yml, which I had
set to zero in the process of re-building Apache and trying to clean
things up. When I reset the Admin mode to 1, the application started
working again.
I cannot have administration mode active when the application is put
into service, so if anyone knows what might be done to do to get the app
working with Admin mode =0, I would appreciate the help.
Thanks,
Mat
More information about the jifty-devel
mailing list