What Controls Module Page


What file created by the Module and Application Builder changes what appears on the first page of the module? I’ve read through many of the free modules and existing ones and it is not obvious to someone new to this software. The docs refer to:

Create a new PHP screen
You must then create your PHP pages that will show/edit data from tables using the skeleton templates provided as an example in the directory modulebuilder/myobject_page.php (For the development of a script from the command line, see Script development).

No such file exists under the modulebuilder directory in version 10.0.1?

I created a test module called MyTestMod2. As a test I copied the free awstats module over the index page into the directory created by the Module Builder (custom/mytestmod2) and it does not show an error message about awstats not being setup as it does when you go to the awstats module from the menu. The test module is showing the home page boxes instead. So, where does Dolibarr specify what file to use if it is not using either the index.php file or the mytestmod2index.php file?

Obviously it is setting that somewhere.

I used the same code in the same place (after the main.inc.php includes) except I changed the text manually in case it was having trouble loading the lang file for a different module.

if (empty($conf->global->AWSTATS_DATA_DIR))
print ‘<div class=“error”> This is a test error!</div>’;
print ‘TEST THIS!’;

What am I missing??

As an experiment I copied the entire awstats dir to mytestmod3, fixed the errors with the class name and references to awstats and it works as expected. Clearly I’m missing something with the module builder or it has a flaw in the setup. I guess I’ll just manually create modules like this unless someone can tell me why the module builder isn’t working as expected.