nhelliwell Posted July 9, 2014 Share Posted July 9, 2014 Hello, Admitting defeat on this one. I have a custom module, works as expected in my dev environment but when I put it live, not all the hooks are being called. It's confusing because some do. For clarity: All code is valid on server, all hooks have been correctly registered (checked via back office positions, and in the DB) Full list of hooks below, but at the moment actionCustomerAccountAdd, and actionObjectCustomerUpdateAfter, are both called fine when I make a change via the front office. They are not called when I make an edit via the back office, neither are actionProductAdd/Update. Seems to me that it's hooks called via the back office that aren't being called, although actionAdminControllerSetMedia is being called as the custom tab I have is being added to the product. On top of this, I added some custom logging to the AdminProduct/CustomerControllers to see what was happening, and this is not being logged to file. BUT, logging from my actionObjectCustomerUpdateAfter is (called via front office). So it all points to a back office issue, but I cannot figure out what. All in all, a confuddlement. Any help will be greatly received. Full list of hooks: $this->registerHook('createAccount') &&$this->registerHook('actionCustomerAccountAdd') &&$this->registerHook('actionObjectCustomerUpdateAfter') &&$this->registerHook('actionValidateOrder') &&$this->registerHook('cancelOrder') &&$this->registerHook('actionOrderStatusUpdate') &&$this->registerHook('actionObjectProductUpdateAfter') &&$this->registerHook('actionCarrierProcess') &&$this->registerHook('displayAdminProductsExtra') &&$this->registerHook('actionProductAdd') &&$this->registerHook('actionAdminControllerSetMedia') &&$this->registerHook('actionProductCancel') &&$this->registerHook('updateProduct') &&$this->registerHook('actionProductUpdate') Link to comment Share on other sites More sharing options...
nhelliwell Posted July 9, 2014 Author Share Posted July 9, 2014 (edited) Related? I get a LOT of warnings when I go into the products admin section from back office: Warning on line 1150 in file /home/xxx/public_html/classes/Tools.php[2] preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Compilation failed: invalid range in character class at offset 24 Edited July 9, 2014 by nhelliwell (see edit history) Link to comment Share on other sites More sharing options...
ingleknifeshop Posted July 25, 2014 Share Posted July 25, 2014 I'm having same problem. Not found anyway to fix it yet. Warning: preg_replace() [function.preg-replace]: Compilation failed: invalid range in character class at offset 24 in /home/xazeznek/public_html/classes/Tools.php on line 1150 Link to comment Share on other sites More sharing options...
nhelliwell Posted July 25, 2014 Author Share Posted July 25, 2014 Hi, I fixed that by disabling 'Accented URL' in Preferences -> SEO & URLS -> Set up URLs. (I think) Hooks not been called was just a log location problem, they were being called just fine. 2 Link to comment Share on other sites More sharing options...
Recommended Posts