Jump to content
Jaep

New module does not show up in module page

Recommended Posts

Hi,

I created a new module following the tutorial overhere: https://devdocs.prestashop.com/1.7/modules/creation/
But I immediately got stuck. 

Basically I created a directory 'mymodule' in the modules folder, added a mymodule.php with the code from the tutorial and then I am stuck at where the tutorial says: 

Quote

Now go to your back office, then in the Modules page (found at “Modules” > “Modules & Services”) choose the Selection tab. The module is visible in the modules list, with its information displayed – and no icon for now.

The new module mymodule does not show up and I can not continue with the tutorial.

Running Prestashop 1.7.5 with classic theme. I installed a module by uploading a ZIP file and that went fine.

Is there a way to force rescanning the modules folder?

John

Share this post


Link to post
Share on other sites

Try to zip your folder and upload this as a module. If there are any error popping up this might be the reason the module folder is not detected.

Share this post


Link to post
Share on other sites

I zipped and uploaded it and it got installed without any error messages. It shows up in the list of modules.

Is...

  1. ...the tutorial wrong (install modules MUST be done by uploading ZIP) ? 
  2. ...something wrong with my installation ?
  3. ...something wrong with my settings ?
  4. ...a bug in Prestashop ?
Edited by Jaep (see edit history)

Share this post


Link to post
Share on other sites

I continued with the tutorial, next steps were the methods install() and uninstall(). After doing a few zip-uploads, disabling, uninstall, etc,  the module shows up in the module catalog.

Big thank you, @JBW!

Share this post


Link to post
Share on other sites

I was struggeling with the same and could my modules only get installed with the .zip install in 1.7. Guess it's because the changed the module system in 1.7 but forgot to update the documentation, because in 1.6. it works as described (and even with zip you have to trigger the install after the upload manually).

But glad to hear it works for you.

Share this post


Link to post
Share on other sites

This is a PITA because I am not developing on my PC, but on the server - is there any way to get the module recognised on the server, rather than having to copy it back to the PC, zip it and then re-upload it?

Share this post


Link to post
Share on other sites

Seems there are something wrong when you make it. Try read again development doc, it is easy to create your-own-module.

Or share your module for check :)

Share this post


Link to post
Share on other sites
3 hours ago, Jeff A said:

s there any way to get the module recognised on the server, rather than having to copy it back to the PC, zip it and then re-upload it?

Yes, usually if your module is correct and placed in the modules foler you will find it under "Modules Catalog" (not Modules Manager!) with a install button. I was searching for the same for a long time I still find the logic quite confusing ;)

Share this post


Link to post
Share on other sites

I added "improve" on my nginx config file, so that it now looks like this 

location ~ /(international|_profiler|improve|module|product|feature|attribute|supplier|combination|specific-price|configure)/(.*)$ {
        try_files $uri $uri/ /index.php?q=$uri&$args $admin_dir/index.php$is_args$args;     
    }

Share this post


Link to post
Share on other sites
On 9/28/2019 at 7:47 AM, mayjorblayke said:

is there any way to get the module recognised on the server, rather than having to copy it back to the PC, zip it and then re-upload it?

Yes, as I said, put in on your server (e.g. FTP) and you will find it in the module catalog (not manager!) with a install button.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More