I'm developing a module, which was working fine on my local environment, and today I was testing it on my online store and a certain view from my module is returning 500 from Nginx. Here is what shows on the log:

2017/03/12 16:02:55 [error] 1156#1156: *65909 FastCGI sent in stderr: "PHP message: PHP Fatal error: Call to a member function setTitle() on boolean in /var/www/magento/htdocs/app/code/core/Mage/Customer/Block/Form/Register.php on line 43" while reading response header from upstream, client: , server: fingerstore.com.br, request: "GET /chatbot/chatdata/telegram/webhook/r43u9ukey HTTP/1.1", upstream: "fastcgi://", host: "store.com"

And here is my controller:

class Werules_Chatbot_ChatdataController extends Mage_Core_Controller_Front_Action {
    public function telegramAction()
        $this->getLayout()->getBlock('root')->setTemplate("werules_chatbot_view.phtml"); // use root block to output pure values without html tags

This view is a webhook for Telegram/Facebook chat integration, and that's why I'm using the root block to output a blank page with no HTML. This is required by Facebook Messenger API. But I also tried to remove the line that sets the root block, but it didn't worked.

How can I fix this? I'm on it for hours now.

EDIT: So I found out the problem, I had another module that was putting a block (customer_form_register_ajax) in every Magento page. I fixed it by adding <remove name="customer_form_register_ajax" /> to my XML file. But that's a mare workaround, is there a way to remove all blocks, custom or not, from my module page? Like overrite everything?


Browse other questions tagged or ask your own question.