Stuuuuuck! Custom addon not working...losing hair!

Can anyone help with this? I'm seriously stuck!



[color=#282828][font=arial, sans-serif][size=3]Does anyone happen to have any experience with troubleshooting add-ons? I currently have a custom add-on that works well in my local environment, but fails to render a specific file in our (soon to be production) environment on a hosted server. [/size][/font][/color]



[color=#282828][font=arial, sans-serif][size=3]The URL in question is /admin.php?dispatch=products.update&product_id=12345[/size][/font][/color]

[color=#282828][font=arial, sans-serif][size=3](The customer side of this add-on works fine. ) [/size][/font][/color]



[color=#282828][font=arial, sans-serif][size=3]This specific file is not being called. It does exist on the server:

/addons/audio_player/controllers/admin/products.post.php[/size][/font][/color]



[color=#282828][font=arial, sans-serif][size=3]The admin portion of this add-on is mirrored very much like the attachments add-on.

The admin side adds another tab to the product page admin. (tabs_extra.post.tpl) - This works fine.



I verified the appropriate file in func.php is getting called and fetches the appropriate data. (though I am not sure who is the caller)[/size][/font][/color]

[color=#282828][font=arial, sans-serif][size=3]I verified that other add-on hooks that use this technique call their products.post.php file correctly: attachments, buy_together, etc. [/size][/font][/color]





[color=#282828][font=arial, sans-serif][size=3]I have been developing iteratively, and this file is new to the add-on.

It feel like maybe CS-Cart is trying to render previous version of the add-on (caching?)



Has anyone experienced anything like this? Seeing as how it works fine locally, I'm wondering if there are any common server-level issues that might help me out.



Things I have tried:

  • deleted the caches files in /var/cache
  • appended '&cc' to the end of the add-on admin page
  • uninstalled and reinstalled the add-on
  • deleted and re-uploaded all of the add-on files- updated version number and priorities in the addon.xml files, both after deactivating the addon and uninstalling it. [/size][/font][/color]



    [color=#282828][font=arial, sans-serif][size=3]The addons folder looks like this: [/size][/font][/color]



    [color=#282828][font=arial, sans-serif][size=3]/addons/audio_player/controllers/admin/audio_player.php[/size][/font][/color]

    [color=#282828][font=arial, sans-serif][size=3]/addons/audio_player/controllers/admin/products.post.php

    /addons/audio_player/controllers/customer/audio_player.php

    /addons/audio_player/controllers/customer/categories.post.php

    /addons/audio_player/controllers/customer/products.post.php

    /addons/audio_player/addon.xml

    /addons/audio_player/func.php

    /addons/audio_player/init.php[/size][/font][/color]

    [color=#282828][font=arial, sans-serif][size=3]/addons/audio_player/js

    /addons/audio_player/config.php[/size][/font][/color]



    [color=#282828][font=arial, sans-serif][size=3]the skins admin folders look like this: (omitting the customer files since the customer side works well) [/size][/font][/color]



    [color=#282828][font=arial, sans-serif][size=3]/skins/basic/admin/addons/audio_player/hooks/products/tabs_extra.post.tpl[/size][/font][/color]

    [color=#282828][font=arial, sans-serif][size=3]/skins/basic/admin/addons/audio_player/views/audio_player/manage.tpl

    /skins/basic/admin/addons/audio_player/views/audio_player/update.tpl[/size][/font][/color]





    [color=#282828][font=arial, sans-serif][size=3]Cscart addon documentation is really quite dearth so any help you all can provide is much appreciated. We're at our wits end here.[/size][/font][/color]

Sorry, didn't read your whole post, but you don't put pre/post controllers in the controllers directory. They will NOT be found.

They need to be in an addon directory.



Suggest you do a bit of research for how to create an addon and how to use hooks in cs-cart. There are tutorials on this forum. Google is a better search agent than the forum search.

Thanks for the reply tbirnseth. I believe you might be misunderstanding the directory structure I have posted. Those controller directories you see listed are subdirs of the add-on itself, not the main controllers directory. The structure is on par with what the documentation shows and with how all the other add-ons are structured.



I don't think that's the issue as I have the add-on working perfectly on my local box. It's just the hosted environment does not seem to be cooperating.



The same problem is reproduced with the other 3rd party add-ons installed on this instance. None of the product page admin tabs are rendering content for the 3rd party addons.



Besides appending &cc on the end of a url to clear cache, are there any other steps needed when updating an add-on for the app to pick them up? It seems like the admin side of the add-on is ignoring any new code changes.



It looks a lot like this error. And the version of CS Cart I'm working on is 3.0.3.

[url=“http://forum.cs-cart.com/tracker/issue-2258-tabs-in-admin-not-clickable/”]http://forum.cs-cart.com/tracker/issue-2258-tabs-in-admin-not-clickable/[/url]





thanks

This problem has been resolved.