FreePBX Module Generator

Not sure if I’m missing something / if it’s supposed to be this way. But if anyone is familiar with the FreePBX module generator ( FreePBX Module Generator - FreePBX OpenSource Project - Documentation) are you not allowed to make modules that have a name that starts with a number? I tried making one that started with 911 and it didn’t create it successfully. I looked back at the output and it was

Generate a module with the following information?
Module type: FreePBX
Module rawname: 911calls
Module version: 1.0.0.
Module description: test
Module type: Reports
Module License: GPLv3
Type [yes|no]:yes
Generating Directories for your module
Generating File structure for your module
Generating module.xml
Generating BMO class
Generating module page and view
Setting proper permissions to your module
Installing your module
Unable to install module 911calls:

 - Could not read module.xml
Updating Hooks...
Done

Chowning directories...
Done

Reloading
Reload Started

Reload Complete

However, if I do the exact same settings except changing the name to “calls911,” it’s perfectly fine and I can see the module in the Reports section in Admin → Module Admin.

Generate a module with the following information?
Module type: FreePBX
Module rawname: calls911
Module version: 1.0.0
Module description: test2
Module type: Reports
Module License: GPLv3
Type [yes|no]:yes
Generating Directories for your module
Generating File structure for your module
Generating module.xml
Generating BMO class
Generating module page and view
Setting proper permissions to your module
Installing your module
Generating CSS...
Done

Module calls911 version 1.0.0 successfully installed
Updating Hooks...
Done

Chowning directories...
Done

Reloading
Reload Started

Reload Complete

image

Any ideas? Or is this by design?

Thanks!

1 Like

I wrote that and I can tell you, not on purpose. I don’t know if that restriction is anywhere because we simply have never named modules with numbers at the beginning. It could be a bug, nothing I would have ever found lol. Ultimately I just took my helloworld examples and templated them out in to a shell application using symfony. There isn’t a whole lot of extra logic

1 Like

Ah okay lol. Yeah, I did look through the modules and saw nothing that started with a number, so thought there might be something behind not starting it with a number. I’ll just name it something like “Emergency Calls” to get around that.

Thanks!

Weren’t there old upgrade modules that were named “2.11 to 12 upgrade tool” or “12 to 13 upgrade tool”?

The module name that shows in the GUI menu is not the same as the ‘rawname’ that’s being discussed here. Under the hood the name of the module for upgrading major versions is called ‘versionupgrade’

2 Likes

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.