I've got an issue that might be related to http://drupal.org/node/833730
- contenttype A containing a field B with cck_block enabled, cck text field C
- i use http://drupal.org/project/node_embed to embed a node type D into field C
- node D gets rendered using a special node-embed--D.tpl.php
After some investigating I put a drupal_set_message() into the template and found out, that the template gets called TWICE when the cck_block is displayed (weird- only one of the calls makes it into $content though). So I wouldn't mind because the output is like I expect it, but unfortunately my template does some very much time consuming file_get_contents() calls so every embedded node calls this function twice and the page load nearly doubles due to this issue.
Any hint appreciated!
Comments
Comment #1
thommyboy CreditAttribution: thommyboy commentedi did setup a clean drupal installation with some very basic contenttypes to demonstrate the effect. if someone is interested in having a look at it, i could provide the login... this effect only occurs when using cck_blocks
Comment #2
dan.nsk CreditAttribution: dan.nsk commentedThis issue could definitely be marked as duplicate of #833730: Cck block display settings override basic node settings.
Comment #3
damien_vancouver CreditAttribution: damien_vancouver commentedI'm travelling right now but when I get back (in a couple days) I'll have a look. If it's indeed the same problem / solution as #833730: Cck block display settings override basic node settings. it should be easy to backport the same type of fix to the 6.x branch.
Comment #4
thommyboy CreditAttribution: thommyboy commentedthat would be great!
Comment #5
DaPooch CreditAttribution: DaPooch commentedWas this ever resolved for the 6x branch? Supposedly this issue is also responsible for causing a conflict between cck_blocks and webform_conditionals due to it adding js twice (http://drupal.org/node/1215908#comment-6867148) and I'm trying to find the best resolution for that.
Comment #6
damien_vancouver CreditAttribution: damien_vancouver commentedLooks like what we need is a 6.x backport of the patch in #24 from #833730: Cck block display settings override basic node settings..
Here is the commit of what made it into 7.x as a result of that: http://drupalcode.org/project/cck_blocks.git/commitdiff/f56075d
But, the patch is using the 7.x API fucntions field_attach_prepare_view(), entity_prepare_view(), and then field_attach_view() to create $built_nodes['nid'] (instead of node_build_content() which is what we don't want running twice).
before 7.x patch:
after 7.x patch:
So, we need the same kind of technique in 6.x, but using the 6.x API. I must confess I was in Perl land for Drupal 6 so I skipped that version altogether and I'm totally unfamiliar with the API. Can someone attempt a backport and post the patch here?
Comment #7
DaPooch CreditAttribution: DaPooch commentedAnyone have any ideas on this? It's still causing trouble for me with Webform Conditionals module. My understanding is the node_build_content function is causing form_alter to run twice which is screwing things up. See http://drupal.org/node/1587394#comment-6994402