haml outputs errors into rendered page - _hamlout.format_script_false?

49 views
Skip to first unread message

jollyroger

unread,
Dec 27, 2009, 9:11:32 AM12/27/09
to Haml
Hey guys,

i keep getting this haml-output in my view (yes, this is actually
printed out in the browser)


_hamlout.format_script_false_false_false_false_false_true_false
((haml_very_temp = haml_temp; haml_temp = nil; haml_very_temp));}

This is printed within a div which is rendered by this code:

- form_tag ({:action => "show"}, :id => 'checkout_next_step_form') do
= submit_tag '', :type => 'image', :src => get_img_prefix +
PATH_TO_CHECKOUT_NEXT_STEP_BUTTON, :class =>
'checkout_next_step_button mouseover_button', :id =>
'next_step_button'

This piece of code renders the following html:

<div id="shoppingcart_next_step">
<form method="post" id="checkout_next_step_form" action="/
checkouts/show"><div style="margin: 0pt; padding: 0pt; display:
inline;"><input type="hidden" value="mWhjyobUb7f/uRqWpuv8sNNfw5cU/
a5iMxfVT+r/THE=" name="authenticity_token"/></div>
<input type="image" value="" src="/images/de/checkout/
checkout_next_step_button.png" name="commit" id="next_step_button"
class="checkout_next_step_button mouseover_button"/>
</form>

_hamlout.format_script_false_false_false_false_false_true_false
((haml_very_temp = haml_temp; haml_temp = nil; haml_very_temp));}
</div>

How can this happen?
I don't see any obvious errors in the code above.
How could i debug this further?

Nathan Weizenbaum

unread,
Dec 27, 2009, 4:34:17 PM12/27/09
to ha...@googlegroups.com
In order to properly debug this, I'd need to see the entire Haml template. Could you put it up on gist?


--

You received this message because you are subscribed to the Google Groups "Haml" group.
To post to this group, send email to ha...@googlegroups.com.
To unsubscribe from this group, send email to haml+uns...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/haml?hl=en.



jollyroger

unread,
Jan 4, 2010, 7:59:20 AM1/4/10
to Haml
Hi Nathan,

and sorry for the late reply.

The thing is, I had a major refactoring recently and since that, I
don't get this error anymore.

So => problem solved...:-)

P.S.:

I also believe that my markup wasn't the best (forms nested in
tables....), so it was probably more a problem with my code than
your's (although I'd still consider outputting the errors a bug)

On Dec 27 2009, 10:34 pm, Nathan Weizenbaum <nex...@gmail.com> wrote:
> In order to properly debug this, I'd need to see the entire Haml template.
> Could you put it up on gist?
>

> > haml+uns...@googlegroups.com <haml%2Bunsu...@googlegroups.com>.

Nathan Weizenbaum

unread,
Jan 4, 2010, 11:41:18 AM1/4/10
to ha...@googlegroups.com
I consider it a bug as well. I'd very much like to see a template that produces it, because I can't really do anything about it otherwise.

To unsubscribe from this group, send email to haml+uns...@googlegroups.com.

Christoph Petschnig

unread,
Jan 26, 2010, 10:15:23 AM1/26/10
to Haml
Nathan,

I got the same effect with this erroneous code:

%h1 My Header
= render :partial => 'form'}
%br

See that orphan }

Hope that helps. Regards

Christoph

Nathan Weizenbaum

unread,
Jan 26, 2010, 3:00:57 PM1/26/10
to ha...@googlegroups.com
Hmm... in the case of Ruby syntax errors, I'm afraid I can't really help. Since Haml compiles to Ruby code, and any Ruby code in the Haml template is literally included in the compiled template, it will always be possible to create malformed Ruby with odd effects such as this.


--
Reply all
Reply to author
Forward
0 new messages