helmut2509 Posted February 19, 2017 Posted February 19, 2017 Hi, I am just trying to write a module following the respective instructions. After having uploaded the module I did a Module Refresh, which popped up a PHP syntax error (which was in my module). After having fixed the error I made again a Refresh, but the new Module did not appear. Then I used the "Add Module From Directory" Function but the new Module was not found. It's strange that PW detected a syntax error in the new module but not the module itself.....
LostKobrakai Posted February 19, 2017 Posted February 19, 2017 The syntax error is detected by simply reading the file, while a php class showing up as module does require a bit more steps to be correct. So you're modules folder does have the same name as the xxx.module file and the module class? Your module is extending Process or implementing Module?
helmut2509 Posted February 19, 2017 Author Posted February 19, 2017 27 minutes ago, LostKobrakai said: The syntax error is detected by simply reading the file, while a php class showing up as module does require a bit more steps to be correct. So you're modules folder does have the same name as the xxx.module file and the module class? Your module is extending Process or implementing Module? yes, the module extends the class WireData: class MenuMaker extends WireData implements Module
horst Posted February 19, 2017 Posted February 19, 2017 and the file of your MenuMaker is located and named like so: "site/modules/MenuMaker/MenuMaker.module" ?
helmut2509 Posted February 19, 2017 Author Posted February 19, 2017 45 minutes ago, horst said: and the file of your MenuMaker is located and named like so: "site/modules/MenuMaker/MenuMaker.module" ? Yes!
kongondo Posted February 19, 2017 Posted February 19, 2017 9 minutes ago, helmut2509 said: Yes! Is that a "Yes, problem solved!" or a "Yes, I've ticked all the boxes but it still doesn't work!" ? 1
helmut2509 Posted February 19, 2017 Author Posted February 19, 2017 8 minutes ago, kongondo said: Is that a "Yes, problem solved!" or a "Yes, I've ticked all the boxes but it still doesn't work!" ? Now I got it. PW takes the Module name neither from the file name nor from the folder name nor from the class name but from the getModuleInfo function, which I have copied from a sample code.... Sorry! 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now