Download & Extend

mongodb_block.module conflicts with block.module

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

Title:Cannot redeclare template_preprocess_block» mongodb_block.module conflicts with block.module
Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
block_conflict-1163584-5.patch0 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).View details | Re-test

#6

Status:needs review» needs work

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

#7

Status:needs work» needs review

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

AttachmentSizeStatusTest resultOperations
block_conflict-1163584-6.patch6.44 KBIdleFAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).View details | Re-test

#8

Forgot to $git add --all

AttachmentSizeStatusTest resultOperations
block_conflict-1163584-7.patch0 bytesIdleFAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).View details | Re-test

#9

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

AttachmentSizeStatusTest resultOperations
block_conflict-1163584-9.patch13.21 KBIdleFAILED: [[SimpleTest]]: [MySQL] 195 pass(es), 4 fail(s), and 0 exception(es).View details | Re-test

#10

Status:needs review» needs work

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.

AttachmentSizeStatusTest resultOperations
block_conflict-1163584-11.patch11.08 KBTest request sentNoneView details

#12

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

#13

Delete

#14

#15

Status:needs work» fixed

#16

Status:fixed» closed (fixed)

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

#17

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

#18

Status:needs work» needs review

Micro patch attached.

AttachmentSizeStatusTest resultOperations
mongodb-taxonomy_index_rebuild-1170652-23.patch4.24 KBTest request sentNoneView details
mongodb_block_conflicts_with_blck.patch4.83 KBTest request sentNoneView details
nobody click here