Describe the bug
If you FTP (or copy via network, etc) a module into the modules folder, it never shows up in the Back Office, however when you have a .zip file and use the 'upload a module' button, it does.
To Reproduce
Steps to reproduce the behavior:
Additional information
PrestaShop version: 1.7.4.2
PHP version: 7.x
:+1: it could be a good improvement.
@colinegin Already talk about this to Cecile, she agreed :D
I'm not sure if the labels are correct. To me, this is a bug.
Have a look at the developer documentation (https://devdocs.prestashop.com/1.7/modules/creation/)
At this stage, if you place the module’s folder on the /modules folder, the module can already be seen in the “Modules” page in the back office, in the “Other modules” section – albeit with no real name nor thumbnail.
This clearly isn't happening, and truthfully, being new to Presta development, I've no idea how to realistically develop a module if the only way is to upload a zip file all the time! Nevertheless, the general feel of the documentation is to work in the local filesystem in the modules folder and you'll be able to see the changes in BO.
I've tried turning off all caching, etc in Performance tab, but to no avail.
It seems I've missed something fundamental...?
A big thing, yes.
It's not the ZIP file you need to have on the /modules folder, as you can read into the doc (the part you mention). It's the content of this ZIP files.
Thank you @PrestaEdit, I forgot to mention that.
I remember that the main issue with that solution was the fact that it was needed to scan entire /modules folder for new modules which was time consuming
@kpodemski According to https://stackoverflow.com/a/41521863 then using DirectoryIterator shouldn't be too bad, especially if you have a cached value of the previous time you've scanned and use that as comparison. The tricky bit in that case would be determining what's new if you have no previously cached value, for which you must assume all are candidates, and then use other metrics to decide what is the best course of action.
That said, opening the 'modules' page at the moment is rather slow anyhow, so a few millisecs would disappear easily. (I've noticed the same slowness whether it be local VM or a fast server)
Most helpful comment
A big thing, yes.
It's not the ZIP file you need to have on the /modules folder, as you can read into the doc (the part you mention). It's the content of this ZIP files.