Skip to content

Error produced when "goodbye" form added to view #1

@pauldacus

Description

@pauldacus

In the TUTORIAL.pdf, on page 18-19, the code for a form to delete greetings is as follows:

<form method="post" action="{% url action="goodbye" %}">
Delete:
<select name="greeting_id">
{% for greeting in greetings %}
<option value="{{ greeting.id }}">{{ greeting.greeting_text }}
{% endfor %}
</select>
<input type="submit">
</form>

Putting this form into the list.html template produced an error when you click the "New Greeting" link mentioned earlier in the PDF. The error I got was like this:

Error:
{function_clause,
[{erlydtl_runtime,init_counter_stats,
[undefined,undefined],
[{file,"src/erlydtl_runtime.erl"},{line,208}]},
{cb_test_app_view_greeting_create_html,render_internal,4,[]},
{cb_test_app_view_greeting_create_html,render,2,[]},
{boss_web_controller,render_view,6,
[{file,"src/boss/boss_web_controller.erl"},{line,899}]},
{boss_web_controller,execute_action,5,
[{file,"src/boss/boss_web_controller.erl"},{line,790}]},
{boss_web_controller,process_dynamic_request,5,
[{file,"src/boss/boss_web_controller.erl"},{line,516}]},
{boss_web_controller,process_request,5,
[{file,"src/boss/boss_web_controller.erl"},{line,505}]},
{timer,tc,3,[{file,"timer.erl"},{line,194}]}]}
(Don't worry, this message will not appear in production.)

Oddly, I could see the delete dropdown & submit button, which worked fine, it was only when I clicked on the "New Greeting..." link when I received the above error. Hopefully I am not messing things up somehow, but I did manage to reproduce this same error no matter how I fiddled with this form.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions