Jump to content

Recommended Posts

Posted

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.....

 

Posted

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? 

Posted
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 

Posted

and the file of your MenuMaker is located and named like so: "site/modules/MenuMaker/MenuMaker.module" ?

Posted
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!

  • Like 1

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...