Posted by openWeb on May 20, 2011 at 10:12am
5 followers
| Project: | Mongodb |
| Version: | 7.x-1.x-dev |
| Component: | Block |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
| Issue tags: | block, mongodb, mongodb_block |
Issue Summary
After installing the mongodb-module i deactivated the core-block-module and activated the mongodb_block. Resulting in a white error-page containing:
Fatal error: Cannot redeclare template_preprocess_block() (previously declared in /var/www/beta.reinemuth.info/htdocs/sites/all/modules/contrib/mongodb/mongodb_block/mongodb_block.module:291)
Comments
#1
Perhaps this happened, because i had the blocks-module activated at first. But even if i deactivate it, uninstall it, ... this message appears.
Dirty workaround: Comment out the function "template_preprocess_block" in the blocks-module.
After this: everything works as expected, but as i said: dirty workaround!
#2
I have the same problem.
How exactly do you do this?
I keep getting subsequent errors - Call to undefined function drupal_static() etc.
Here's the line:
function template_preprocess_block(&$variables) {#3
Sorry, wasn't here for a long time... In the meantime i kicked the mongodb-module out completely because having other issues: the database for logs is bloated with one collection for every watchdog-entry, the site simply forgets about block-settings at all...
To fix this particular issue, i simply commented out the whole "template_preprocess_block"-function in core-block-module! I know that we should never-ever patch core, but this was the easiest and fastest solution...
#4
You're right. We shouldn't patch core :)
#5
I ran into this problem as well. Another issue is that BLOCK_REGION_NONE constant is defined in block.module.
This patch renames BLOCK_REGION_NONE to MONGO_BLOCK_REGION_NONE and renames template_preprocess_block() to template_preprocess_mongodb_block()
#6
The last submitted patch, block_conflict-1163584-5.patch, failed testing.
#7
I made the last patch with other patches applied. Here's a new one.
#8
Forgot to
$git add --all#9
And the whole time I've forgotten
$git diff --staged. I'm on a roll#10
The last submitted patch, block_conflict-1163584-9.patch, failed testing.
#11
I know the testbot is broken but I do actually keep creating terrible patches. I'm pretty sure this is the one.
#12
@langworthy, could you give your five cents on this: http://drupal.org/node/1447806
#13
Delete
#14
Closing this one, this should be solved by #1447806: Constant BLOCK_REGION_NONE already defined in require_once()
#15
#16
Automatically closed -- issue fixed for 2 weeks with no activity.
#17
I just ran into the reported problem with the latest dev release during the install process.
Fatal error: Cannot redeclare template_preprocess_block()#18
Micro patch attached.