The attached patch makes Block independent from Node. It is split off from #375397: Make Node module optional. There is one slight issue with node grants, but that has been solved with module_implements().

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

Xano’s picture

Status: Needs work » Needs review
Issue tags: +makenodeoptional
FileSize
16.48 KB

Status: Needs review » Needs work

The last submitted patch failed testing.

Xano’s picture

Status: Needs work » Needs review
FileSize
16.4 KB
Frando’s picture

+/**
+ * Add the node type visibility settings table for blocks.
+ */
+function node_update_7007() {
+  $ret = array();
+
+  $schema = node_schema();
+  db_create_table($ret, 'node_block_visibility', $schema['node_block_visibility']);
+
+  return $ret;
+}

This is no good, you have to copy the schema array here as it was done in block.install. Otherwise, if the schema changes, the update would change as well which is bad because subsequent updates would fail. See http://drupal.org/node/150220 for details.

Otherwise, the patch looks great.

Frando’s picture

Status: Needs review » Needs work
Xano’s picture

I think we want {node_block_visibility} the same, regardless of whether we got it through an installation or an update.

Frando’s picture

Xano: With Schema API as it stands, we may not use hook_schema() declarations in hook_update_N. Please read http://drupal.org/node/150220, the explanation there is as good as it can be explained, so I won't try to explain it here in the issue.

Xano’s picture

Status: Needs work » Needs review
FileSize
0 bytes

Ah, thanks for the link :)

Frando’s picture

Status: Needs review » Needs work

empty patch file?

Xano’s picture

Status: Needs work » Needs review
FileSize
16.83 KB

Crappy internet connection. Cvs makes a new file, but due to the bad connection it has no contents to put in it.

Status: Needs review » Needs work

The last submitted patch failed testing.

alexanderpas’s picture

Version: 7.x-dev » 8.x-dev
valthebald’s picture

Status: Needs work » Closed (fixed)

According to the latest 8.x, node is no more dependency for block.
I was able to disable node module (which in standard installation was required by comment, forum and book), and enter block configuration page

Xano’s picture

Assigned: Xano » Unassigned