Fabrik Framework path error if user is at a component

koze85

Member
Hello I am trying to load the Fabrik template in my index.php and it loads fine
FabrikHelperHTML::framework();
FabrikHelperHTML::windows('a.myFabWin');
so I can use Fabrik to popup forms
If I am at homepage or any other non component page it loads up just fine but when I am at a components sub page lets say for kunena (.../forum/index) then I get this path error

.../forum/fab/tipsBootStrapMock.js 404 (Not Found)
.../forum/fab/fabrik.js 404 (Not Found)





which is logical since these folders does not exist they exist without the forum/ path

please advise me how can I correct it thanks!
 
a workarround I found is to have a module with an empty fabrik form in a hidden class style and then the framework is loaded correctly
also with the previous method fabrik.getWindow does not exists as a command
 
Hi
You will need to add:
PHP:
FabrikHelperHTML::iniRequireJS();
before those two lines.

Part of what that does is set the base path for the require js files, which if missing will incorrectly default to /forum in the kunena pages.

I guess you got that code example from the wiki? If so which page was it on, as it needs updating.

Cheers
Rob
 
Back
Top