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

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]: .....



  • Options
    K17K17 Français / French Paris, France ✭✭✭

    In your addon, instead of "addJsFile" you've put "xaddJsFile" no ?

  • Options

    @K17 said:
    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 actually xrender

    the AssetModel isn't the plugin anyway.


    addJsFile is part of the controller not the AssetModel

    Asset model is not general used for queuing the javascript files

    grep is your friend.

  • Options

    Thanks for the help... I have fixed that myself.

  • Options

    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:

    1. A description of the problem
    2. Expected behaviour
    3. Actual behaviour
    4. Full steps to repeat and code examples
    5. Platform information

    grep is your friend.

  • Options

    Also if you solved it, then provide the solution to help others.

    grep is your friend.

Sign In or Register to comment.