Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I noticed today that the cck block display settings are overriding the basic display settings. For instance I have field_1, on the basic display settings I have it set to hidden so that it does not render in $content. But I have the display setting in the cck_blocks display settings as default. What I end up with is field_1 displaying in $content and in the cck block that I have added. I'll see what I can dig up to help resolve this.
Comment | File | Size | Author |
---|---|---|---|
#24 | cck_blocks_conten_view-833730-24.patch | 1.48 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks for your report!
Have you used cck_blocks 6.x? If yes, have you seen the issue in that version? I'm using 6.x on several sites myself and never had a similar problem. For that reason I'm very sure, that it is a 7.x-only issue.
I'm not able to investigate this issue before August. I'd really appreciate if you could gather more information about that topic.
Comment #2
gleroux02 CreditAttribution: gleroux02 commentedYes, I have used cck_blocks 6.x and did not see this issue. I think it was because in 6.x at least the last version that I used the display setting was set in the block itself. I like this approach better and think that it makes more sense, ie setting it in the display settings on the content type. I will definitely see what I can dig up for the reason why this is happening. I'll let you know what I find out.
Comment #3
gleroux02 CreditAttribution: gleroux02 commentedAh, ok I see the culprit. Although I am not sure yet what can be done about it, or if this should be more of a feature request for when you have a chance to work on this again. So it looks like in cck_blocks_block_view the node get's built out using node_build_content($node, 'cck_blocks') which allows the display settings from cck blocks to be applied and the proper blocks built. The issue for my case is that the display setting for the block needs to be different from what is in $content. And it looks like that is not possible since it is rendering the node with the cck_blocks display settings. Either way for now I have a solution which is to just hide($content['field_1']) in my node.tpl.
Comment #4
nadavoid CreditAttribution: nadavoid commentedI'm seeing this issue in the cck_blocks 7.x-1.0. Updating version to 7.x-1.0 because it was released more recently than the 1.x-dev.
Comment #5
Azol CreditAttribution: Azol commentedConfirmed
Comment #6
lonester CreditAttribution: lonester commentedI've been seeing the same issue this past week. I have no insight into how difficult this is to resolve, but I'd humbly suggest it is a bug rather than a feature request, as I can't think of an instance (others may be able to) where I'd want to display each CCK block field twice (once in blocks, once in the node).
I'll try the solution as recommended above (thanks gleroux02!) and hope it works. It is a very useful module btw, as I can use it to achieve the same effect in Drupal 7 that would otherwise require the (currently) dev versions of Views, Panels and CTools.
Comment #7
agileadamConfirmed. I'm having the same issue.
Thanks!
Comment #8
hansfn CreditAttribution: hansfn commentedConfirmed. Subscribe.
Comment #9
thommyboy CreditAttribution: thommyboy commentedi've got an issue with the 6.x version http://drupal.org/node/1053130 could it be related to this issue?
Comment #10
tbcorb CreditAttribution: tbcorb commentedI'm having the same issue, which was temporarily fixed by gleroux02 suggestion in comment#3 (thanks!). Wasn't the option added to version 6 that allowed visibility in the main node to be turned on or off as an option (with the default being "on"). This default seems to have been ported over to version 7 without an administrative interface to turn it off. (Love the module, though!)
Comment #11
Wolfgang Reszel CreditAttribution: Wolfgang Reszel commentedsubscribe
Comment #12
hedley CreditAttribution: hedley commentedSame issue with 7.x-1.0 the hide($content[field_1]) in node.tpl.php workaround is doing the trick for me.
Just a note for others, I got 'undefined index' errors as I put the hide() in a generic node.tpl.php so I created a more specific node--page.tpl.php which solved the problem.
Comment #13
brucebertrand CreditAttribution: brucebertrand commentedremember to enclose the name of the field in quotes so you don't run into undefined constant error messages.
Comment #14
hedley CreditAttribution: hedley commentedThis is the code I've ended up using:
Comment #15
Scott J CreditAttribution: Scott J commentedThat's weird. I've just noticed this behaviour. I was sure that it used to work as expected.
Comment #16
olbion CreditAttribution: olbion commentedSame issue for me. Would be great if there was a proper solution. This is a nice module
Comment #17
duvrai CreditAttribution: duvrai commentedsubscribe
Comment #18
federico.giunchi CreditAttribution: federico.giunchi commentedsubscribe
Comment #19
Azol CreditAttribution: Azol commentedDisplay Suite offers exactly the same functionality, creating the blocks for fields and correctly displaying them in regions of your choice while hiding them from main content. Moving off to DS for the present.
Comment #20
servantleader CreditAttribution: servantleader commentedConfirmed. Same problem with 7.x-1.0 and dev. Makes this module useless because I don't want the filed displayed twice.
Comment #21
momentuminc CreditAttribution: momentuminc commentedI'm having the same problem.
Comment #22
momentuminc CreditAttribution: momentuminc commentedI'm having the same problem.
Comment #23
Aleet CreditAttribution: Aleet commentedsame issue here.
Adding the hack to node.tpl worked for me.
Comment #24
Anonymous (not verified) CreditAttribution: Anonymous commentedAttached is a patch that uses the actual field build process, instead of a full node build call. This appears to fix the problem on my end, and leaves the "could be in both a block and as content" option available as well.
Comment #25
Anonymous (not verified) CreditAttribution: Anonymous commentedThank you all for your reports. As I'm very busy at the moment, I'm unable to test the patch myself. Could someone please test it and report the results back in here?
I'll hope to find some time to include the patch in a new dev version.
Comment #26
Scott J CreditAttribution: Scott J commentedWorks for me.
Comment #27
hedley CreditAttribution: hedley commentedYes the patch in #25 is working well for me as well
Comment #28
damien_vancouver CreditAttribution: damien_vancouver commentedpatch in #24 works great for me too, nice work kevee!
after applying using "git apply cck_blocks_conten_view-833730-24.patch" in my cck_blocks dir, the layout and visibility settings from "CCK blocks" no longer override all the other view mode settings in Display Suite (ie. Default, Full Content, Teaser, etc). Yet my CCK blocks settings are applied to my CCK blocks. Perfect!
As I'm the third to report success with that patch, I'm setting it to reviewed & tested by the community and version to 7.x-1.x-dev... maybe it can find its way into 7.x-1.x-dev ?
Comment #29
jmix CreditAttribution: jmix commentedHi,
sorry, i'm tottally new to drupal and i don't understand how to apply this patch for CCK Blocks !
Is there a "git" module or something like that ?
Thanks for helping !
Comment #30
acrollet CreditAttribution: acrollet commentedPatch in #24 works well for me too, any chance of getting it committed? thanks much!
Comment #31
Anonymous (not verified) CreditAttribution: Anonymous commented@jmix
Every project has a Git instructions page (this one is at http://drupal.org/node/192744/git-instructions), which includes information on applying patches. Git is a version control system, it's not a module for Drupal.
Comment #32
edgt CreditAttribution: edgt commentedHi everyone, patch #24 works as said... would be great if gets committed...
Greetings
Comment #33
beauz CreditAttribution: beauz commentedHi, having same problem can we get the patch committed??
Comment #34
Alex Regenbogen CreditAttribution: Alex Regenbogen commentedsubscribing
Comment #35
crispinbailey CreditAttribution: crispinbailey commented+1
Comment #36
NancyDrusub
Comment #37
hedley CreditAttribution: hedley commentedPatch in #24 works perfectly for me against 7.x-1.0
Comment #38
amirtaiar CreditAttribution: amirtaiar commentedPatch in #25 working grate, thank you.
Comment #39
thommyboy CreditAttribution: thommyboy commentedcould the code of the patch work in 6.x-1.3 too?
Comment #40
d21anthony CreditAttribution: d21anthony commentedI found something for all the noobs like myself that are or could be having an issue working with git. I'm not totally sure it's a conventional method but it works and is fairly easy. Check it Out! it will save you hours probably http://drupal.org/node/620014
Comment #41
selfuntitled CreditAttribution: selfuntitled commentedJust wanted to confirm the patch worked for me - took a few seconds to realize that hiding the field label in display doesn't also hide the block title. As soon as I figured that out, and set the block title to everything looked as expected.
Comment #42
rooby CreditAttribution: rooby commentedSeems to work for me too.
Comment #43
andypostIssue depends on mainteiner's feedsback for git access
there's a call to co-maintain #1353792: Request for Drupal administrator to give damien_vancouver GIT access
and request for git access #1320044: available to co-maintain cck_blocks for Drupal 7
Trailing whitespace
Comment #44
rooby CreditAttribution: rooby commentedI say leave this active. Postponed issues can sometimes have a habit of getting lost.
This does not really fit in with the usage of postponed at http://drupal.org/node/156119 as it is a valid issue that has no blockers and the maintainer could still commit it (even if that is unlikely).
Comment #45
damien_vancouver CreditAttribution: damien_vancouver commentedActually it is now likely again! I expect to be added as a co-maintainer within the next 24hrs, and the first thing I will be doing is cleaning up this patch, applying it, and then making a 7.x release out for download ASAP. I'll go through all open issues and make sure there are no other bugs that I can fix as well.
I've personally been using the module for 6+ months and it works great (once this patch is applied). It is definitely stable enough for a release.
Comment #46
andypost@damien_vancouver aftre applying the patch please clean trailing white-spaces
Comment #47
damien_vancouver CreditAttribution: damien_vancouver commentedCommitted at last!
In 7.x-1.x-dev now, and will be in 7.x-1.1 release (coming soon).
Comment #48
thommyboy CreditAttribution: thommyboy commentedsounds great that there is a solution now! how about the 6.x version? i've got an issue there http://drupal.org/node/1053130 and was said it's related to this one here?