It's wrong to assume that people want the youtube channel block in the first sidebar. Especially considering that the block view function causes the js to be added to the page, and in some case (particularly admin pages) this triggers js errors and break all other js on the page ("Uncaught TypeError: Cannot call method 'replace' of undefined " youtubechannel.js:3).
On many sites, we dont even use the core block admin module bu instead manage blocks through context or panelizer. So it makes no senve having to take extra steps to disable it (which we have to do now with the following code):
/**
* Implements hook_block_info().
*/
function youtubechannel_block_info_alter(&$blocks, $theme, $code_blocks) {
// Disable the youtube channel block - this will be positioned manually.
// Note: This should not be enabled by the youtubechannel module in the
// first place.
$blocks['youtubechannel'][0]['status'] = 0;
$blocks['youtubechannel'][0]['region'] = -1;
}
It should not be set up that way by default. The block should be disabled and left to users to decide where they want to put it.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2041111-no-forced-enabled.patch | 366 bytes | dgtlmoon |
Comments
Comment #1
dgtlmoon commentedPatch supplied
Comment #3
parwan005 commentedThis issue has been fixed in latest release.
Comment #4
parwan005 commented