I've created a DS field that will work as a "Read more" link and open the current node in a Colorbox.
My content type contains some random text-, email- and image fields and one "Long text"-field.

When I click my link and I haven't configured a DS layout for the node, the node opens as it should with all fields included. However, when I try to activate a layout e.g. "One Column" I run into problems: the "Long text" field disappears completely. It's not represented in the markup at all, so it's not CSS. The color box opens without the field in it.

I hope you can help me fix this amazingly irritating problem.

EDIT: Forgot to mention that the field is a conditional field, I tried removing the condition which solved the problem, however now I can't use conditional fields on this field and I really want to :(

Comments

iLLin’s picture

Download DEV and I force the use of the "colorbox" view mode. Make sure you have the DS layout selected for the colorbox view mode and see if that makes a difference.

Anonymous’s picture

How do you force use of the color box view mode? I've never been able to use that view mode, it automatically uses "Default" or "Full"... I realized that this might be a problem with the conditional fields module, I'll get back to you when I've done some testing.

Anonymous’s picture

This seems to be a problem with the conditional fields module, it doesn't show up when I view the node "The regular way" either. Probably has nothing to do with the colorbox node module..

I'm still curious about the "Force colorbox view mode". :)

iLLin’s picture

Sure in lines 65-76 or so (Latest DEV) I force the use of a display type. It's a hack for now but it works. If colorbox is turned off, it defaults to full.

      // @TODO: Update this to reflect the correct method once this
      // issue is resolved: drupal.org/node/1154382
      if (isset($page_callback_result['nodes'])) {
        $html = "";
        foreach ($page_callback_result['nodes'] as $nid => $tmpNode) {
          if (isset($tmpNode['#view_mode'])) {
            $html .= drupal_render(node_view($tmpNode['#node'], 'colorbox'));
          }
        }
      } else {
        $html = drupal_render($page_callback_result);
      }
Anonymous’s picture

Super! Thanks

iLLin’s picture

Status: Active » Closed (works as designed)

I am assuming this solved your problem, if not feel free to re-open.

iLLin’s picture

Issue summary: View changes

See "EDIT" in the Issue description