I've started work on the port to D7.

I'll switch the head version in CVS to be the work-in-progress on the D7 port.

Comments

tekante’s picture

StatusFileSize
new3.28 KB

The head revision doesn't appear to contain any D7 work. Attached is a port that is working for me using D7 beta 1. No translation related functionality has been tested so I have no idea if that functionality has been maintained but it should allow the basics of defining a type as providing a block, listing it on the block admin page and returning the block content rendered with an updated default template.

tom_o_t’s picture

Assigned: tom_o_t » Unassigned

Thanks @tekante - I ran out of time before making any real work.

I or one of the other maintainers will try to take a look at this as soon as possible.

JimmyAx’s picture

subscribe

pcambra’s picture

suscribe

tom_o_t’s picture

I'm going to take a look at this patch and any work needed for the port today at the #D7CX sprint in NYC. @JimmyAx or @pcambra or anyone else - did you get a chance to test the patch? I'll be in #drupal-contribute in IRC between now and 1pm Eastern time.

tom_o_t’s picture

StatusFileSize
new12.1 KB

Here's @tekante's port as a patch.
From a quick initial test, nothing breaks when enabling the module, I'll dig in further now.

tom_o_t’s picture

Getting the following error after enabling this module, setting up one new content type, but not having any content types available as blocks, and creating a new 'article' node.

Notice: Undefined property: stdClass::$nodeblock in nodeblock_preprocess_node() (line 233 of /Users/tom/Sites/drupal7/sites/all/modules/nodeblock/nodeblock.module).

tom_o_t’s picture

Fixed #7.

Now getting some taxonomy errors when displaying a node as a block with some tags. I have half an hour left, so I may just do an alpha release for others to build on.

Notice: Undefined index: taxonomy_term in taxonomy_field_formatter_view() (line 1366 of /Users/tom/Sites/drupal7/modules/taxonomy/taxonomy.module).
Notice: Trying to get property of non-object in entity_extract_ids() (line 7254 of /Users/tom/Sites/drupal7/includes/common.inc).
Notice: Trying to get property of non-object in taxonomy_term_uri() (line 148 of /Users/tom/Sites/drupal7/modules/taxonomy/taxonomy.module).
Notice: Trying to get property of non-object in taxonomy_field_formatter_view() (line 1370 of /Users/tom/Sites/drupal7/modules/taxonomy/taxonomy.module).
tom_o_t’s picture

StatusFileSize
new12.21 KB

Updated patch with minor tweak for #7.

This patch has issues with displaying content in a "normal" (non-block) display, e.g. listed on the homepage, the logic that determines when the title is being displayed is wrong. I've not tracked down the taxonomy issue yet either. I'll go ahead and make an alpha release for 7 anyway.

tom_o_t’s picture

Assigned: Unassigned » tom_o_t

Alpha release has been done, should show up in a few minutes.
I've not tested any of the translation stuff yet, if someone could do that and report back that would be a huge help.

irakli’s picture

@tom_o_t,

by "alpha release" did you mean dev release? The only release on the project page is the dev release, for D7.

Thanks

tom_o_t’s picture

@irakli - yes, I ended up doing just a dev release.

irakli’s picture

Cool. Thanks, works well so far.

skilip’s picture

node_view() in D7 has been changed. The following line in nodeblock_block_view() :

  $block['content'] = node_view($node, $nodeblock_display['teaser'], TRUE, $nodeblock_display['links']);

Should be changed into:

  $block['content'] = node_view($node, ($nodeblock_display['teaser'] ? 'teaser' : 'page'), 0, $nodeblock_display['links']);
michaellander’s picture

Assigned: tom_o_t » michaellander
Status: Needs work » Closed (fixed)