After upgrading to 6.x-2.0-rc6 node-view template suggestions no longer work. Have also tried the latest dev, problem persists.

CommentFileSizeAuthor
#14 348241-1.patch638 bytesredndahead

Comments

pfournier’s picture

Just got the same problem. Solved by commenting out line 617 in date.module (function date_prepare_node()):

// unset($node->view);

This does not seem to cause any unwanted effect, at least on my site. Maybe the module author can provide a cleaner patch.

The reason $node->view should not be unset is that views_preprocess_node() relies on this to set up the node-view* template suggestions.

hunthunthunt’s picture

Priority: Normal » Critical

Changing to critical as it's causing core functionality to fail.

fatro’s picture

I got the same problem

Thank pfournier!

szy’s picture

Count me in. The mentioned upgrade made all my views' node templates, using
this method and date fields, dissappear.

And indeed: other views, using the same theming method, but not using dates,
all are fine.

@pfournier - your hint saves my life :], thanks.

Szy.

hunthunthunt’s picture

Can anyone confirm if this issue persists in the latest dev version?

szy’s picture

Yes, you still need to comment line #633, as written before:

#633: // unset($node->view);

Szy.

hunthunthunt’s picture

Thanks SZY, while this amend to the module does fix the issue with the template's not showing (specifically node-view-XXX.tpl.php) it seems to create another problem, with views teasers the incorrect GMT date value is passed in the field array.

Anonymous’s picture

Subscribing - I also need this to work.

asimmonds’s picture

IMHO this line should change to:
unset($node->view->date_info);

As the preceding code in that function has just copied date_info from the view object down to the parent node object.

micahw156’s picture

Confirmed the change in #9 alleviates the problem. I have no idea what other effects would result from unsetting this value.

Timo.Kissing’s picture

Is there any way to make this bug appear in the issues for the views module? I spent 3 hours tracking this down because my search in project/issues/views did not yield a result. When I finally tracked down the problem in the code and wanted to post a bug here I did of course see it, but who would search for a bug in date module when some view templates are not used?

hunthunthunt’s picture

@Timo.Kissing I feel yr pain...

Feel free to add a new issue on views and link it to this one. Would hate for anyone else to waste half a day with this issue as we have ;)

Timo.Kissing’s picture

Issue over at Views2 posted: http://drupal.org/node/370155
If you set the status here to fixed, please be so kind and set it to fixed there as well. I will monitor both issues, but I may not be able to do it daily.

redndahead’s picture

Status: Active » Needs review
StatusFileSize
new638 bytes

Here is a patch for #9.

karens’s picture

Status: Needs review » Fixed

The copy of the view that gets attached to every node in the calendar is giganormous and can make your site crawl to a stop. That's why it's removed. It's not an issue on a simple view but on a calendar where you can have dozens or even hundreds of nodes, each with this huge object attached, it can be.

I will put it back in, but there may be performance issues reported. We'll have to keep an eye on it.

Status: Fixed » Closed (fixed)

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