Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I'm using Custom Formatters with Display Suite, but after applying a custom formatter on one field, the rest of the fields disappeared. (the rest of the fields do not have a custom formatter).
Is this expected behavior? Thanks.
Comments
Comment #1
ManyNancy CreditAttribution: ManyNancy commentedOh no that's not accurate, not all of the rest of the fields disappear, only the CCK fields.
Thanks.
Comment #2
Deciphered CreditAttribution: Deciphered commentedHi,
What version of Display Suite are you using, and can you confirm you are definitely using Custom Formatters 6.x-1.4?
The reason I ask is that I recall an issue like this early in the development stages of this integration, but the issue was fixed.
Cheers,
Deciphered.
Comment #3
ManyNancy CreditAttribution: ManyNancy commentedYes, 1.4 and the latest stable DS, 1.2 and other DS modules also the latest stable.
Comment #4
Deciphered CreditAttribution: Deciphered commentedCan you supply the code of the formatter and further information so I can attempt to reproduce the issue?
Cheers,
Deciphered.
Comment #5
ManyNancy CreditAttribution: ManyNancy commentedSorry, I don't have this information anymore, found another way to do the same thing, and done with that site.
I'll let you know when I try again.
Comment #6
attiks CreditAttribution: attiks commentedRan into the same problem with custom formatter =
<img src="[site-url]/[filefield-filepath]" alt="" />
The formatter is working, but all other fields are gone :/
Comment #7
attiks CreditAttribution: attiks commentedBTW, same formatter using advanced mode (like
return '<img src="/' . $element['#item']['filepath'] . '" />';
) is working okComment #8
Mac Clemmens CreditAttribution: Mac Clemmens commentedI'm also experiencing issues with this.
Comment #9
Slavison CreditAttribution: Slavison commentedSame with me, using 6.x-1.x-dev
Comment #10
Deciphered CreditAttribution: Deciphered commentedHey guys,
Just thought I'd let you know you aren't being ignored, just haven't looked into this issue yet, but I expect it to be dealt with very shortly.
Cheers,
Deciphered.
Comment #11
Deciphered CreditAttribution: Deciphered commentedI suspect that something in DS changed, as a piece of voodoo code I inserted to fix this exact same issue in previous versions of DS was now causing the issue in the latest version of DS.
The reason I call this voodoo code is as it really shouldn't do anything at all:
Fix will be committed shortly for the release of 6.x-1.5-beta3.
Cheers,
Deciphered.
Comment #12
Deciphered CreditAttribution: Deciphered commentedCommitted to DRUPAL-6--1 and released in 6.x-1.5-beta3.
Cheers,
Deciphered.
Comment #14
xtfer CreditAttribution: xtfer commentedStill getting this issue in 6.x-1.5-beta4 & the normal 6.x-dev release.
Comment #15
TimeRaider CreditAttribution: TimeRaider commentedI have this issue too, using more than 1 custom formatter with DS
Comment #16
TimeRaider CreditAttribution: TimeRaider commentedgetting this issue in 6.x-1.5-beta4 and in 6.x-1.4
Comment #17
Danny_Joris CreditAttribution: Danny_Joris commentedI have the same issue. I'm using Display Suite 1.3 and Custom formatters 1.4 .
My custom formatter is a basic html format where I wrap a span around the output:
<span class="text-wrap">[formatted]</span>
.I have 3 fields where I apply this. If I apply this to the first field, the formatter does it's job, but the 2 other fields disappear. When I apply this to the second field, only the last one disappears.
I also tried to make 3 copies of this custom formatter and assign each one to a different field, but this had the same result as I would have used only one type of formatter.
Any ideas? Is it safe to upgrade to 6.x-1.5-beta4 as it is not listed on the project page?
Comment #18
Danny_Joris CreditAttribution: Danny_Joris commentedI upgraded from 1.4 to 1.5-beta4 and the problem got worse: Now when I add only one custom formatter, this will remove all formatting + labels from all the fields in that node display. Even imagecache settings of images.
Comment #19
mrfelton CreditAttribution: mrfelton commentedSubscribe. Same problem as poster #18.
Display Suite 6.x-1.x-dev
Node Displays 6.x-2.x-dev
Node Displays Contrib 6.x-2.x-dev
Custom_formatters 6.x-1.x-dev
Comment #20
mattiasj CreditAttribution: mattiasj commentedI have the same problem but I don't even use the Display Suite. I tried with 6.x-1.5-beta4 and 6.x-1.4.
Comment #21
timwee CreditAttribution: timwee commentedI have the same issue. tried with 6.x-1.4 and 6.x-1.5-beta4.
Comment #22
jvdurme CreditAttribution: jvdurme commentedYep, 6.x-1.4 here with same issue.
Added 1 custom formatter to Node display and all fields below that one (not above, those are still there) are gone now on the displayed node.
Is this being investigated?
Comment #23
bcobin CreditAttribution: bcobin commentedSame issue - the body disappears after the custom formatted node. I'm on the dev version, so I changed the version number - hope that's OK...
Comment #24
Renee S CreditAttribution: Renee S commentedSubscribe. Basically I have to put any custom formatted field LAST or everything downstream of them gets wiped out. I'm not using DS.
UPDATE: This is only a problem in Basic mode, not Advanced. Issue with tokens, maybe?
Comment #25
Deciphered CreditAttribution: Deciphered commentedThe solution to this is actually quite simple, but I have yet to be able to test it in every situation.
All you need to do is add the following line before line #424 (
$full = token_get_values('node', $element['#node']);
) of custom_formatter.module:unset($element['#node']->content);
Comment #26
Renee S CreditAttribution: Renee S commentedI can confirm that this fix works. Tested on a link content type and text. Thanks!
Comment #27
WorldFallz CreditAttribution: WorldFallz commentedI can confirm it fixes the problem as well-- simple text field formatted to display as an anchor.
Comment #28
Deciphered CreditAttribution: Deciphered commented#26/#27
Either of you two used CF with Display Suite? If so did the fix still work there?
Comment #29
Renee S CreditAttribution: Renee S commented@Deciphered: Alas no, I don't use Display Suite, so I couldn't say.
Comment #30
WorldFallz CreditAttribution: WorldFallz commentedNope-- me neither. I'll try to install it and see what happens.
Comment #31
Deciphered CreditAttribution: Deciphered commentedThanks guys, I appreciate the testing you have done. I will do a quick test tonight and try to atleast get a dev out. Have big plans for the next stable, but no time to dedicate to it yet.
Comment #32
Deciphered CreditAttribution: Deciphered commentedFix committed to 6.x-1.5