Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Custom module settings in backend
 
bas-i
Jr. Member
 
Total Posts:  9
Joined:  2008-09-05
 

Hi,

I’m doing a custom module that needs to have a configuration screen in the backend. So as not to reinvent that wheel, I started from a known-working module (Smile OpenERP Synchro). I installed that module using Magento Connect and that worked fine in the backend.

After copying the relevant bits to my own module space (app/code/local) and change various identifiers accordingly, my module does show up in the menu on the left (backend: System / Configuration) but when I click on it, I get a 403 error.

This is the behaviour as discussed here: http://www.magentocommerce.com/boards/viewthread/16576

In trying to solve the problem, I copied the Smile OpenERP Synchro directory to a fresh install of Magento (instead of installing it using Magento Connect) and then I have the same problem: 403.

It seems that there’s something else I have to do to register my module that does happen when a module is installed using Magento Connect but that does not happen when I simply put my files in app/code/local.

What am I missing?

BTW. I was hoping to get some logging from Magento (it’s returning a 403 error) but alas, nothing :(

 
Magento Community Magento Community
Magento Community
Magento Community
 
somesid
Sr. Member
 
Total Posts:  83
Joined:  2008-06-20
 

If you download the clean package here : http://code.google.com/p/magento-openerp-smile-synchro/downloads/list
Then copy the OpenERPSync folder in app/code/local/Smile

Then copy app/code/local/Smile/OpenERPSync/etc/modules/Smile_OpenERPSync.xml to app\etc\modules\Smile_OpenERPSync.xml

Check that the menu is in place, you got a 403 but it’s normal.

Then disconnect / reconnect => should be ok (acls need to refresh), if you’re not using an administrator user don’t forget to add the module in your rights list in the “roles” menu.

Anyway the part you’re looking for is all in the : system.xml as explained in the other thread.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bas-i
Jr. Member
 
Total Posts:  9
Joined:  2008-09-05
 

Hi,

good to get confirmation that a module can be installed “by hand” and have it picked up by Magento successfully.

I did a reinstall on a different server and installed the OpenErp_Sync module by hand and it worked (like you said: you need to logout and login again).

I then took the bits of that module I need, changed the identifiers (company name, module name), installed it and it worked!

Some observations:

- the original Magento installation was on Mac OS X, the new one on linux (debian etch);
- I changed my company identifier so the resulting name (CompanyName_ModuleName) was quite a bit shorter.

I don’t know (yet) if any of these 2 things made the difference (problems with Magento on Mac OS X? name too long?) but for now, I’m happy wink

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top