Jump to content

What could be the reason for ActionAttributeGroupSave not working


Amazzing

Recommended Posts

I have a module, that works just fine on a test server. It uses actionAttributeGroupSave Hook. Hook is registered when module is installed



$this->registerHook('actionAttributeGroupSave')


And then, the following method works just fine:



public function hookActionAttributeGroupSave($params)
{   
//do smth
}


But when I install this module on another server, the ActionAttributeGroupSave just doesn't work, nomatter what I include in hookActionAttributeGroupSave function.

Module files on both servers are identical. PS version on both servers is 1.5.4.1

 

The interesting part is that hookDisplayAttributeGroupForm works fine.

I just don't know where to look for the reason of such strange behaviour. What factors could affect the actionAttributeGroupSave hook?

Link to comment
Share on other sites

It seems like hook works :) I was misled by the way I used to check whether it works or not.
On both servers I used a simple check:
//on saving attribute group 
public function hookActionAttributeGroupSave($params)
{           
echo '<pre>';
print_r($params);
echo '</pre>';  
}

So, on the test server, after saving an attribute group I had a white page with printed params. And only when I removed that code from hook, the att group was saved properly. But on the production server, nothing of this kind appeared after saving an attribute group.

 
So instead of simple print_r($params), I tried to perform a very complex task including multiple queries to DB, and then print_r a variable. And it worked :))
 
So, it looks like when server is powerful, it doesnt' stop on that print_r page.
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...