stratboy Posted May 3, 2013 Share Posted May 3, 2013 Hi, quite a strange thing: I made a bare- bones test module (I'm a newbe) but clicking the install button in admin it gives me a blank page. The code is this: class CustomShippingRates extends Module{ public function __construct(){ $this->name = 'customshippingrates'; $this->tab = 'shipping_logistics'; $this->version = '1.0'; $this->author = 'Luca Reghellin'; $this->need_instance = 0; // $this->ps_versions_compliancy = array('min' => '1.5'); //$this->dependencies = array('blockcart'); $this->dependencies = array(); parent::__construct(); $this->displayName = $this->l('Custom shipping rates'); $this->description = $this->l('Shipping rates based on items volumes.'); $this->confirmUninstall = $this->l('Are you sure you want to uninstall?'); if (!Configuration::get('CUSTOMSHIPPINGRATES_NAME')) $this->warning = $this->l('No name provided'); }//END CONSTRUCT public function install(){ return parent::install() && $this->registerHook('actionCartSave') && $this->registerHook('displayTop'); } public function uninstall(){ if (!parent::uninstall()) parent::uninstall(); } public function hookActionCartSave(){ } public function hookDisplayTop(){ } }//END CLASS Any idea? Link to comment Share on other sites More sharing options...
vekia Posted May 3, 2013 Share Posted May 3, 2013 turn on error reporting and then refresh your back office, if some error appear, please paste the error code here close the public function __construct(){ in correct place! Link to comment Share on other sites More sharing options...
stratboy Posted May 3, 2013 Author Share Posted May 3, 2013 No, the constructor is correctly closed. Anyway, I activated the error tracing, if I get some message I'll post. Thank you. Link to comment Share on other sites More sharing options...
Paul C Posted May 3, 2013 Share Posted May 3, 2013 Have you by any chance forgotten to put : <?php On the first line of the file and either don;t have blank space at the end of the file or preferably DON'T put: ?> at the end of the file.... The uninstall function doesn't really make any sense as you're trying to uninstall twice... better with just: public function uninstall() { return parent:uninstall(); } Can't see anything else obviously wrong.... Link to comment Share on other sites More sharing options...
stratboy Posted May 3, 2013 Author Share Posted May 3, 2013 Thank you, I'll use your suggestions! Have you by any chance forgotten to put : <?php On the first line of the file and either don;t have blank space at the end of the file or preferably DON'T put: ?> at the end of the file.... The uninstall function doesn't really make any sense as you're trying to uninstall twice... better with just: public function uninstall() { return parent:uninstall(); } Can't see anything else obviously wrong.... Link to comment Share on other sites More sharing options...
vekia Posted May 4, 2013 Share Posted May 4, 2013 so whats going on now? stratboy let us know Link to comment Share on other sites More sharing options...
orion_1988 Posted May 9, 2017 Share Posted May 9, 2017 Same problem here: Blank page after installing or uninstalling a custom module. Fix: as Paul C already mentioned in his post, removing the ?> tag from the end of the php file works like a charm. 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