简体   繁体   中英

Heist digestible form tags are not expanded

I looking for ideas what could go wrong with Snap Heist digestible forms. I copy pasted templates and handler. Most of the page is rendered correctly, but digestible form tags are left intact ie instead form tag there is dfForm, input dfInputText etc. There is no warnings in backend console nor browser one.

I use bindDigestiveSplices so dfForm should be resolvable splice.

    (v, _) <- runForm "myform" myForm
    heistLocal (bindDigestiveSplices v) $ render "resources/myform"

<apply template='/layouts/application'>
  <bind tag='main'>
      <dfForm action="/justDoIt" method="POST">
        <apply template="/resources/_form"/>
      </dfForm>
  </bind>
</apply>

I made a typo (missed a letter) in source code routing. After hours of change/build/run cycle I figured out that there is 2 routing. First is described in source code where you can assign handlers to URI path and the second is automatic routing based on template file names.

So I made a typo in route binding in source code, mean while automatic routing was resolving template without any typo, but it doesn't bind Digestible splices, therefore 404 error were masked and proper content delivered by not evaluated correctly!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM