Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product

Getting error struck with that... can anyone help me please

edited November 12 in Development

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

Comments

  • K17K17 Unkorneglosk - Français / French ✭✭✭

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

  • @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.

    @salmanshafiq

    addJsFile is part of the controller not the AssetModel

    Asset model is not general used for queuing the javascript files

    grep is your friend.

    K17
  • 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:

    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.

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

    grep is your friend.

    K17
Sign In or Register to comment.