attempt to call method 'allowed_to_post_topic' (a nil value)
olueiro opened this issue · comments
olueiro commented
Hi leafo,
I found an error on Reply older post:
URL: <my-site>/topic/2/new-post
Error
/usr/local/share/lua/5.1/lapis/application.lua:401: ./app.lua:137: attempt to call method 'allowed_to_post_topic' (a nil value)
stack traceback:
./app.lua: in function 'filter'
/usr/local/share/lua/5.1/lapis/application.lua:17: in function 'run_before_filter'
/usr/local/share/lua/5.1/lapis/application.lua:361: in function </usr/local/share/lua/5.1/lapis/application.lua:355>
Traceback
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/lapis/application.lua:401: in function 'handler'
/usr/local/share/lua/5.1/lapis/application.lua:130: in function 'resolve'
/usr/local/share/lua/5.1/lapis/application.lua:167: in function </usr/local/share/lua/5.1/lapis/application.lua:165>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/lapis/application.lua:173: in function 'dispatch'
/usr/local/share/lua/5.1/lapis/nginx.lua:230: in function 'serve'
content_by_lua(nginx.conf.compiled:30):2: in main chunk
allowed_to_post_topic
is not a @topic
method.
Line 98 in 5e0a1a5
Can you help me. please :)
leaf commented
Pushed a fix to the example app to address the issue.
Note, I haven't tested the example app in this repo in quite some time, so you may encounter more issues. Feel free to open issues and I can take a closer look
olueiro commented
Thank you so much for the speedy reply!