SaturnFramework / Saturn

Opinionated, web development framework for F# which implements the server-side, functional MVC pattern
https://saturnframework.org
MIT License
708 stars 108 forks source link

Broken links created with Links module #188

Closed j-u-l-i-e-n closed 5 years ago

j-u-l-i-e-n commented 5 years ago

I have the same issue as #108 and #126 (perhaps #180 ?) when using the quickstart guide with Saturn 0.80.

I think it might come from the ctx.Request.Path.Value (I am not sure how it's handled behind the scenes by the router or otherwise).

In the books example : After adding forward "/books" Books.Controller.resource in the browserRouter, http://localhost:8085/books/ yields /books// for the ctx.Request.Path.Value, and thus even if Links.add doesn't add a slash between the Links.index and "add", the generated path is erroneous.

vfat0 commented 5 years ago

I had the same problem and I believe it is because the template installs Saturn 0.7.3, updating to Saturn 0.8 via .paket/paket.exe update fixed it for me, however you also need to change renderXml to renderHtml in BooksController.fs.

Krzysztof-Cieslak commented 5 years ago

Duplicate of #152