bcosca / fatfree

A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to render template when using route with token

Sokhavuth opened this issue · comments

I love f3 framework. It is similar to Express.js for Node.js. I have tried to build a blog engine with f3 framework as I use to do with Python and Node.js. Everything works fine. However, I am unable to render any template when using route with token (route with parameter in other frameworks). Here the link to the repository: https://github.com/Sokhavuth/tvp, and the link to the working blog on Heroku is here https://khmerweb-tvp.herokuapp.com/ . You could login with email "root@tv.com" and password "password"; the link for login is https://khmerweb-tvp.herokuapp.com/login. On the admin page, click on the second icon on top, and try to click on edit icon of the post at the bottom, you will see the problem (do not click on delete icon, it will delete post).

Your application looks cool, but please do not share credentials publicly. Your message isn't a proper bug report but we could discuss your problem in our Slack channel.

The issue is static files are not loaded while using route with parameter. In Node.js and in Python, every framework gives us the options to choose folder for "views" and static files such as css, js, and image files. In those frameworks, the default folders for views and static files are "views" and "public". And without static files, there won't be template.

Insert a base tag to your html should fix the path issue.

closing this. please reopen if you need any further assistance or join our slack or discord channel for more direct help.