HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Getting error struck with that... can anyone help me please
salmanshafiq
New
I am creating an addon for my client and its almost complete but the issue is backend is working fine when I try to check frontend it's giving me error
Something has gone wrong.
We've run into a problem and are unable to handle this request right now.
Please check back in a little while.
I have on the debug mode and below is which I found in DebugLog
12 Nov 2018 - 18:04:09 Garden Exception: The "AssetModel" object does not have a "xaddJsFile" method.|AssetModel|xaddJsFile| in /home/user/abc.com/public/forums/library/core/class.pluggable.php on 17712 Nov 2018 - 18:04:09 abc.com Garden #0 [internal function]: .....
Regards,
Tayyab
0
Comments
In your addon, instead of "addJsFile" you've put "xaddJsFile" no ?
unlikely. functions beginning with x are a result of magic methods. for instance there is not actual
render
function of the controller it is actuallyxrender
the AssetModel isn't the plugin anyway.
@salmanshafiq
addJsFile
is part of the controller not the AssetModelAsset model is not general used for queuing the javascript files
grep is your friend.
Thanks for the help... I have fixed that myself.
as a side note the reason for these magic method is to be able to trigger events before an after.
@salmanshafiq a tip: Instead of title like "Getting error struck with that... can anyone help me please"
Create descriptive title that contain a summary of problem. Also no one will search for "error" and "please help me".
for issues try to provide the following:
grep is your friend.
Also if you solved it, then provide the solution to help others.
grep is your friend.