开发者

Drupal redirect / hide page content in form_alter

开发者 https://www.devze.com 2023-01-31 20:39 出处:网络
In a certain case I do not wish to display a the content of a form when you get to the form_alter stage of my module. I have tried drupal_goto() and unset($form) . In the first case an error is thrown

In a certain case I do not wish to display a the content of a form when you get to the form_alter stage of my module. I have tried drupal_goto() and unset($form) . In the first case an error is thrown:

Warning: Got a packet bigger than 'max_allowed_packe开发者_StackOverflow中文版t' bytes query: INSERT INTO watchdog...

&the second case the form is rendered. What else can I do?


The problem was the Devel module. Disabling this and it started working.


This you can also solve by increasing the value of 'max_allowed_packet' to 32M or more in my.cnf or my.ini file. It is caused by the fact that mysql has to store a packet that is to big.

0

精彩评论

暂无评论...
验证码 换一张
取 消