Skip to content


`#spinner{}` causes server error #48

Inaimathi opened this Issue · 1 comment

3 participants


Putting a #spinner{} element on a page causes an Internal Server Error page to be displayed instead of the intended page.

Steps to reproduce:
1. Start with the standard index.erl page that ships with nitrogen
2. Add a line to inner_body that reads #spinner{}, (omit the comma, if this is the last line, obviously)
3. Save the page and let sync recompile it (this causes no errors, just emits two INFO REPORT notices saying that index.erl has been recompiled and reloaded)
4. Browse to http://localhost:8000

Expected: The standard startup page with a hidden spinner element at the specified position.

Observed: Internal Server Error in the browser, and the following error dumped to console

=INFO REPORT==== 31-Jul-2012::19:14:34 ===

Environment Notes:

  • Debian Wheezy 64-bit running on a Core i3
  • Erlang R15B01 (erts-5.9.1) [source] [64-bit] [smp:4:4] [async-threads:0] [kernel-poll:false], Eshell V5.9.1
  • Nitrogen from commit d88e01282370599ac878199aa92505307284175c made with make rel_yaws (subsequent commits seem to do nothing related to elements)

This is a fix for that. Jesse can you pick it up and apply please? However the spinning doesn't stop when AJAX request finishes.

diff --git a/src/elements/other/element_spinner.erl b/src/elements/other/element_spinner.erl
index 0d26af2..2715885 100644
--- a/src/elements/other/element_spinner.erl
+++ b/src/elements/other/element_spinner.erl
@@ -10,14 +10,11 @@ reflect() -> record_info(fields, spinner).
 render_element(Record) -> 
     wf:wire(spinner, #hide{}),
-    Terms = #panel {
+    #panel {
         class=[spinner, Record#spinner.class],,
         body=#image { image=Record#spinner.image }
-    },
-    wf:render(Terms).
+    }.
@choptastic choptastic closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.