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)

Files: 
CommentFileSizeAuthor
#18 mongodb_block_conflicts_with_blck.patch4.83 KBMiSc
Test request sent.
[ View ]
#11 block_conflict-1163584-11.patch11.08 KBlangworthy
Test request sent.
[ View ]
#9 block_conflict-1163584-9.patch13.21 KBlangworthy
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]
#8 block_conflict-1163584-7.patch0 byteslangworthy
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]
#7 block_conflict-1163584-6.patch6.44 KBlangworthy
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]
#5 block_conflict-1163584-5.patch0 byteslangworthy
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]

Comments

Issue tags:+block, +mongodb, +mongodb_block

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!

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) {

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...

You're right. We shouldn't patch core :)

Title:Cannot redeclare template_preprocess_blockmongodb_block.module conflicts with block.module
Status:Active» Needs review
StatusFileSize
new0 bytes
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]

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()

Status:Needs review» Needs work

The last submitted patch, block_conflict-1163584-5.patch, failed testing.

Status:Needs work» Needs review
StatusFileSize
new6.44 KB
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]

I made the last patch with other patches applied. Here's a new one.

StatusFileSize
new0 bytes
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]

Forgot to $git add --all

StatusFileSize
new13.21 KB
FAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).
[ View ]

And the whole time I've forgotten $git diff --staged. I'm on a roll

Status:Needs review» Needs work

The last submitted patch, block_conflict-1163584-9.patch, failed testing.

StatusFileSize
new11.08 KB
Test request sent.
[ View ]

I know the testbot is broken but I do actually keep creating terrible patches. I'm pretty sure this is the one.

@langworthy, could you give your five cents on this: http://drupal.org/node/1447806

Delete

Status:Needs work» Fixed

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Status:Closed (fixed)» Needs work

I just ran into the reported problem with the latest dev release during the install process. Fatal error: Cannot redeclare template_preprocess_block()

Status:Needs work» Needs review
StatusFileSize
new4.83 KB
Test request sent.
[ View ]
new4.24 KB
Test request sent.
[ View ]

Micro patch attached.

Just been getting the error:

Drush command terminated abnormally due to an unrecoverable error.                                                                                       [error]
Error: Cannot redeclare template_preprocess_block() (previously declared in
/data/disk/o1/distro/001/drupal-7.14.2-dev/sites/test.com/modules/mongodb/mongodb_block/mongodb_block.module:334) in
/data/all/001/drupal-7.14.2-dev/modules/block/block.module, line 985

Even though the block module is disabled. Happened after enabling ctools. The second patch in #18 seemed to do the trick though at least in recovering my site.

Thank you for integrating MongoDB. I need it.

I am having trouble with blocks. I have she same problems mentioned in #19. It is hard to coordinate disabling block (and dashboard) and enabling MongoDB Block because it seems that template_preprocess_block() is called by core and at least one of the modules needs to be active.

When I ran into problems (on 10 sites at the same time -- silly me), I found to recover I had to comment out the MongoDB cache settings from settings.php (an early return worked well) and moved the mongodb module out of the way, cleared the cache and refreshed the modules. I as then able to put things back and make the changes. It was easier to enable and disable from drush and could sometimes eliminate the steps.

I have not yet been able to get MondoDB Block working. I am running multiple web servers for the site and also accessing view two hosts (sub-domains) and something, either different hosts or the different servers is introducing a problem. I would get the new blocks working fine on a server but when I access view a different server I get WSoD and have to go through the above process again until I found myself repeating enough to call it quits and write this plea for help.

It is hard, for me, to debug this without errors. I am also wondering if the problem is Contex or with how I am sharing cache across the instances.

I would appreciate any tips on how to proceed? Also, is it worth the effort in terms of performance gains.

It looks like Context is a problem, and possibly the root of my problems.

http://drupal.org/node/1367358#comment-6417824

If so, it would be useful to note this in the readme of both projects.

It appears that Adsense
http://drupal.org/project/adsense
will not work with mongodb_block.module
does that make sense?

I can work around this by making some blocks or writing a bit of code, but I sure would appreciate hearing if it is worth it. Performance is the most important issue for me, but I have giving up Context and Adsense, and possibly more.

Thanks for helping me with this decision.