After adding a custom field (various types) they do not appear in the available fields list (Manage Display). The custom fields do appear on the manage fields page.

Note: I am using a two column stacked layout.

Comments

swentel’s picture

Status: Active » Postponed (maintainer needs more info)

I'm confused. Custom fields from DS can't appear on the manage fields, it should be otherwise.

Dean Mortimer’s picture

Let me clarify...

1) I can setup new custom fields such as Code fields and Dynamic fields and they DO appear on the fields tab so I know that they have been setup ok.

2) The created custom fields DO NOT appear in the list of fields on the Manage Display tab.

As a point of reference the "Display Suite for Drupal 7 - Part 3: Fields" tutorial on utube is a good example of what I am trying to achieve. From 1 minute 50 secs (add custom field) field to 3 minutes 40 secs where the custom field called "Custom Display Field" is listed in the disabled region. Essentially I can not see the "Custom Display Field" described in the tutorial.

I've got Eclipse setup so will attempt to debug this tomorrow. If you can point me at any specific pieces of code it would help me provide you with more specific info.

Thanks for responding so quickly.

swentel’s picture

Ow, okay I was confused. You probably haven't selected a layout yet - see the vertical tab at the bottom. DS fields only show up after that, not before.

Dean Mortimer’s picture

I have already selected a layout "Two column stacked" (i saw that this might cause a problem on a forum post).

Dean Mortimer’s picture

Status: Postponed (maintainer needs more info) » Active
swentel’s picture

Status: Active » Postponed (maintainer needs more info)

Still can't reproduce this, setting to needs more info.

sreynen’s picture

Status: Postponed (maintainer needs more info) » Active

I'm seeing this same problem. Layout is selected, but it's just like there is no layout selected. What other info would be useful?

sreynen’s picture

The problem in my case was that module_implements('ds_fields_info') wasn't picking up the .inc files for some reason. I'm not sure why this problem doesn't come up on all sites. I've only seen it once. Adding the .inc files to the .info file made it work for me.

sreynen’s picture

Category: bug » support
Status: Active » Fixed

Scratch that, I was just looking at the wrong site. I did track the problem down to another module that had an include_once() call to a file that wasn't there. This was for some reason causing ds to be missed in the hook_info cache_bootstrap, so it wasn't finding the ds_fields_info hook implementations. This was coming up as a PHP warning in my case, so I'd suggest others having the same problem check for PHP warnings and/or make sure ds_fields_info is part of the result when you call cache_get('hook_info', 'cache_bootstrap');

Moving this to fixed, hoping this fixes it for others. If not, move it back.

Status: Fixed » Closed (fixed)

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

Louis Bob’s picture

Version: 7.x-2.x-dev » 7.x-2.0
Status: Closed (fixed) » Active

Sorry, I have the same issue and I don't understand the solutions to solve it.
I have no specific PHP warning.
How do I practically see the results of "call cache_get('hook_info', 'cache_bootstrap');" ?

This issue seems related to http://drupal.org/node/1808994 ?

Louis Bob’s picture

Status: Active » Closed (works as designed)

ooops...
Fields ARE displayed under NODES display management page, but not under VIEWS DISPLAY, which is normal (I think).
So everything is OK, sorry.

tjmoyer’s picture

I'm having this same issue. Custom fields are not showing up. Strangely, they do at times. I'll work on this for hours and then suddenly they show up, but then they disappear again. @sreynen, what module had the call to include_once() for a non-existant file? I'm working through our list of modules trying to see if that's the case here, too.

sreynen’s picture

tjmoyer, sorry, I don't remember the specific module, but I believe it was a custom module so we were able to fix it directly. I guess there's a chance you have the same custom module, as we have shared code, though I'd hope we would have fixed the problem on your copy as well in that case. Unfortunately, I don't remember the details now.

To answer the question in #11, there are several ways to do it, but I think I called cache_get('hook_info', 'cache_bootstrap') from /devel/php and dpm() the results.

tjmoyer’s picture

Thanks, sreynen. I figured it was a custom module, but was hopeful it wasn't and was one that we're using, too. I've been trying to figure this issue out for several weeks, with no success yet.

I can definitely see that ds_fields_info is missing when I call cache_get('hook_info', 'cache_bootstrap'). When I use dpr() to print out data for debugging the custom field suddenly shows up again, at least until I remove that line and clear cache, at which point it disappears again.

Anonymous’s picture

*Edit* This is for Drupal 6 only:

I thought I had the same problem, wasn't the first time that this happened, but, under the field settings the content types are where the fields are EXCLUDED. Check that you didn't select the content type where it should be visible.

tjmoyer’s picture

Thanks, Deraynger. When you say field settings, I presume you mean under a specific display in Manage Display if you click the "Field display" link? I don't have that because the field doesn't show up in the list. Or do you mean in Display Suite Extras (admin/structure/ds) somewhere? I'm just not finding what you're referring to. Please clarify.

Anonymous’s picture

Sorry tjmoyer, my bad. Was referring to Drupal 6, in 7 it's apparently how I expected it to be in 6 :)
I was referring to /admin/build/ds/modules/nd/fields, then editing any of the fields.

Hanpersand’s picture

This is happening to me, in 7.x-2.4. I intermittently lose my custom fields in my "Manage Display" list. It's very frustrating. Here's my hacky fix, which seems to work fairly consistently:

1. Change the DS layout to something else.
2. Drush CC all (clear all caches)
3. Change layout back.

Sometimes I have to repeat this 1-3 times before the fields show up again. I have no idea what causes it. I'm usually just arranging fields, and then at some point I hit save and when the page reloads, the custom fields are gone. I am using fieldgroup and I know there have been issues between these two modules before. If I notice consistent behavior, I'll report back.

Hanpersand’s picture

I think I know what causes them to vanish in my case. I customized a template... ds-1col--node-blog-post.tpl.php

When I make an HTML change to the template, all my fields vanish. I can do the steps above to get them back. I think that's the cause.

As long as it's not random willy-nilly that they vanish, I can live with that.

Hanpersand’s picture

Nope, it seems more random than a template change. I'm not sure what causes it. Sometimes I've only uploaded CSS, and the fields vanish. Or just vanish. But I don't have to change the DS layout to get the fields back. Just Drush CC all twice or three times and the fields return.

Perhaps I should start a new issue in case others are experiencing this.

zmove’s picture

Same problem here. I had custom fields, stopped working on the project for about 15 days. Then returned to the project, updated some modules (but not display suite that is 2.6) and now, I don't see any display suite custom fields on my manage display tabs whereas I selected a display suite layout (the reset one).

SimonMartineau’s picture

I think the documentation have to indicate clearly that we have to choose a layout to show the custom fields. For me, it two differents logics: fields and layouts: I dont want to use layout so I never activated one. I search my new field in the regular field list.

I'm really happy to solve my problem.... It a so fabulous module!

aspilicious’s picture

Issue summary: View changes
Status: Closed (works as designed) » Active

This issue is about the behaviour that the fields disappear AFTER selecting a layout. I still can't reproduce it but enough people are reporting this to leave this issue open.

Hanpersand’s picture

Yes, as @asplilicious says, my trouble has definitely been happening with layouts in use.

zilla’s picture

ditto - i added a custom code field on type node for a flag:

<?php
print flag_create_link('bookmarks', arg(1)); 
?>

when i go to DS fields, i can see it, but there is no way to see it or control it via manage display - though oddly, has anybody tried to simply place the field in a block to see if it's rendering correctly?

seanr’s picture

Same problem here. I do see ds_fields_info in the result when I run dpm(cache_get('hook_info', 'cache_bootstrap')); but it doesn't show my field in the manage display UI even though I am using a custom layout. Interesting, after reloading the Manage Display page after running the above, I got this:

Notice: Undefined offset: 1 in _ds_field_ui_fields() (line 1857 of /.../sites/all/modules/contrib/ds/includes/ds.field_ui.inc).

Maybe that could shed some light on this?

seanr’s picture

Ahah, found that error documented in an issue. Perhaps others with this problem are running into this issue: #1623590: Notice: Undefined offset: 1 in _ds_field_ui_fields()

faizalluthfi’s picture

I had the same problem after enabling other module. In my case, I had enabled pdf module. It is the first time I had enabled pdf module in my production site. If I disable pdf module, the custom fields are available in manage display page. I had tested to enable pdf module before selecting a layout in my local development site, the problem did not happen again. I am very confused as the differents of these cases are I had enabled pdf module after custom fields are created for ds layout on my production site and I had enabled pdf module before selection a layout on my local development site.

MO-2’s picture

"Comment Easy Reply" module also causes custom fields to disappear: https://drupal.org/node/2171483

aspilicious’s picture

So this is probably related to other modules interfering with DS. Closing for now as there are no new reports.

aspilicious’s picture

Status: Active » Closed (cannot reproduce)
manuel.adan’s picture

I had the same issue becouse a custom field with same id as core (author). After delete and create custom field again with other id (now custom_author instead of author) it works.

cravecode’s picture

I'd just like to confirm for others seeking help. @arcovia's comment (#33) was what helped me.

I named a custom field "Title" by accident, then tried to rename it to something unique. However, the machine name cannot be changed so the ambiguous "title" machine name remained and must have conflicted with the core "title". Deleting the field and recreating it with a nonconflicting name fixed my issue.

karltud123’s picture

#3 solved my problem. Thanks!

Graham Knight’s picture

#33 worked for me too.

dendreten’s picture

#3 is correct indeed.