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

ManyNancy’s picture

Oh no that's not accurate, not all of the rest of the fields disappear, only the CCK fields.

Thanks.

Deciphered’s picture

Hi,

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.

ManyNancy’s picture

Yes, 1.4 and the latest stable DS, 1.2 and other DS modules also the latest stable.

Deciphered’s picture

Can you supply the code of the formatter and further information so I can attempt to reproduce the issue?

Cheers,
Deciphered.

ManyNancy’s picture

Status: Active » Postponed

Sorry, 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.

attiks’s picture

Ran into the same problem with custom formatter = <img src="[site-url]/[filefield-filepath]" alt="" />

The formatter is working, but all other fields are gone :/

attiks’s picture

BTW, same formatter using advanced mode (like return '<img src="/' . $element['#item']['filepath'] . '" />';) is working ok

Mac Clemmens’s picture

I'm also experiencing issues with this.

Slavison’s picture

Same with me, using 6.x-1.x-dev

Deciphered’s picture

Version: 6.x-1.4 » 6.x-1.x-dev
Status: Postponed » Active

Hey 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.

Deciphered’s picture

I 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:

    $node_content = $element['#node']->content;
    unset($element['#node']->content);
    $element['#node']->content = $node_content;

Fix will be committed shortly for the release of 6.x-1.5-beta3.

Cheers,
Deciphered.

Deciphered’s picture

Status: Active » Fixed

Committed to DRUPAL-6--1 and released in 6.x-1.5-beta3.

Cheers,
Deciphered.

Status: Fixed » Closed (fixed)

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

xtfer’s picture

Title: Fields no longer disaplay after using custom formatters » Fields no longer display after using custom formatters
Version: 6.x-1.x-dev » 6.x-1.5-beta4
Status: Closed (fixed) » Active

Still getting this issue in 6.x-1.5-beta4 & the normal 6.x-dev release.

TimeRaider’s picture

I have this issue too, using more than 1 custom formatter with DS

TimeRaider’s picture

Category: support » bug

getting this issue in 6.x-1.5-beta4 and in 6.x-1.4

Danny_Joris’s picture

Priority: Normal » Major

I 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?

Danny_Joris’s picture

Priority: Major » Critical

I 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.

mrfelton’s picture

Subscribe. 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

mattiasj’s picture

I 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.

timwee’s picture

I have the same issue. tried with 6.x-1.4 and 6.x-1.5-beta4.

jvdurme’s picture

Yep, 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?

bcobin’s picture

Version: 6.x-1.5-beta4 » 6.x-1.x-dev

Same 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...

Renee S’s picture

Subscribe. 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?

Deciphered’s picture

The 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);

Renee S’s picture

I can confirm that this fix works. Tested on a link content type and text. Thanks!

WorldFallz’s picture

I can confirm it fixes the problem as well-- simple text field formatted to display as an anchor.

Deciphered’s picture

#26/#27

Either of you two used CF with Display Suite? If so did the fix still work there?

Renee S’s picture

@Deciphered: Alas no, I don't use Display Suite, so I couldn't say.

WorldFallz’s picture

Nope-- me neither. I'll try to install it and see what happens.

Deciphered’s picture

Thanks 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.

Deciphered’s picture

Status: Active » Fixed

Fix committed to 6.x-1.5

Status: Fixed » Closed (fixed)

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