Debugging custom block installation failures
Permalink
Hi-
I'm writing a very simple custom block. It shows up in the "Add Functionality" page under "Downloaded and Ready to Install" but when I try to install it, nothing happens (page reloads and the block is still listed in the "Downloaded and Ready to Install" list). I've successfully made custom block before, but it was by copying existing ones. This one is more or less started from scratch. How can I go about debugging this issue? I'm at a loss right now because there's not even an error message.
Thanks for your help.
I'm writing a very simple custom block. It shows up in the "Add Functionality" page under "Downloaded and Ready to Install" but when I try to install it, nothing happens (page reloads and the block is still listed in the "Downloaded and Ready to Install" list). I've successfully made custom block before, but it was by copying existing ones. This one is more or less started from scratch. How can I go about debugging this issue? I'm at a loss right now because there's not even an error message.
Thanks for your help.
Try isolating the problem. You can achieve this by removing lots of code, seeing if it works, then adding some code back, seeing if it works, etc. -- once it stops working, you know that the problem is in that last chunk of code you added back. For example, start by completely removing all of the block code except for the class/function definitions -- so you just have an empty shell that does nothing. If it won't install, then you know there is a problem with the basic setup of your block (perhaps something wrong with file names or class names or function names? Or perhaps file permissions on the server?). If it does install, then you know the problem is with some of the actual code you wrote, so start adding code back bit by bit and keep uninstalling/reinstalling until it doesn't work anymore.
Best of luck!