Marco Ro Posted March 22, 2018 Share Posted March 22, 2018 (edited) Hi guys, I installed the latest this version of PW the 3.0.96. I notice this error when I try to install a custom module: I try to install my module and this not works. But I also try to install the demo CustomPrices.module the on it's in the Padloper documentation and ugual doesn't work. So I think that maybe could be a bug of the new version. I use: php 7.1.8 in localhost with mamp, server Apache, and run the last version of PW the 3.0.96. Cheers Edited March 22, 2018 by MarcoPLY Link to comment Share on other sites More sharing options...
Zeka Posted March 22, 2018 Share Posted March 22, 2018 Try to add namespaces to your module. Link to comment Share on other sites More sharing options...
Marco Ro Posted March 22, 2018 Author Share Posted March 22, 2018 (edited) Hi @zeka, thank you, So sorry but not work. I added it this way: <?php namespace ProcessWire; class CustomPrices extends WireData implements Module { public static function getModuleInfo() { return array( 'title' => 'Custom Prices', 'version' => 1, 'summary' => 'Example module for modifying prices in Padloper.', 'singular' => true, 'autoload' => true, 'icon' => 'money', ); } But I Found the error! The name of 'title' => 'Custom Prices' need be the exactly the same of the file name in this case: CustomPrices.module Sorry I didn't know this. Now the module is installed. I correct my answer: The name of class CustomPrices need be the exactly the same of the file name in this case: CustomPrices.module Edited March 22, 2018 by MarcoPLY 1 Link to comment Share on other sites More sharing options...
adrian Posted March 22, 2018 Share Posted March 22, 2018 33 minutes ago, MarcoPLY said: The name of 'title' => 'Custom Prices' need be the exactly the same of the file name in this case: CustomPrices.module That's not actually true - it's the class name that has to match the file name. 3 Link to comment Share on other sites More sharing options...
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