Closed timsayshey closed 10 years ago
Okay, I've narrowed it down. It looks like init is getting called after which contains "application.shortcodes={}". So it is clearing the shortcodes that I registered. So I removed it from init and put it in onapplicationstart.cfm, it works now. Not sure if that's how you meant it though.
onapplicationstart.cfm is where you want to register the shortcode. The actual shortcode function should be in events/functions.cfm, as otherwise the function data itself is persisted in the application scope, which is bad.
Right I am doing it exactly as you describe. Running addShortcode() in onapplicationstart. And the shortcode functions are in functions.cfm
The shortcode registers in onapplicationstart.cfm. If I dump application.shortcodes from inside addShortcode, I see my shortcode registered. But when I invoke the shortcode, I get nothing. So I dump application.shortcodes from inside $sc_invokeTag and the struct is empty.
Please advise.
Thanks!