At the moment, if you create a content type with the Link field and then submit a template for this type in Content Templates it breaks the Link field (doesn't show). Since many people use Contemplate a fix for this would be appreciated.

Comments

quicksketch’s picture

Thanks for your input. I'll take a look at this shortly. Of course, patches are always welcome also :-).

quicksketch’s picture

I tried to reproduce this problem with the latest CVS versions of both Link and Contemplate, but everything seemed to work fine. Could you verify the problem still exists in the latest versions?

chrisroditis’s picture

I have also stumbled upon this problem. My versions:
Drupal 4.7.3
CCK 4.7.0 (21/08/2006)
Contemplate cvs (16/07/2006)
the link shows up just a:
<
This happens when I change anything in a template for a CCK node that includes a link field. Thanks for your help!

chrisroditis’s picture

sorry post broken because I input a less than sign. That's what it shows in place of the actual link
This happens when I change anything in a template for a CCK node that includes a link field. Thanks for your help!

quicksketch’s picture

Still can't reproduce this issue. Could you give me a run through on what you're doing and the complete results? Here's what I'm doing:

* Create a new content type
* Add a text content field
* Add a link content field
* Create a new node of this new type
* Create a template for this new type
* Select $field_new_link[0]['view'] from the list of variables on the right, position it where I want it to appear
* Select $field_new_text[0]['view'] from the list of variables, position it where I want it
* View my new node

Everything looks fine.

A couple catches: Contemplate grabs the first node created in that a type to use as an example and pull variables from there. If your very first node of a type doesn't contain a link field with values filled in then it won't display any variables in Contemplate.

chrisroditis’s picture

Funny, but now that I followed that order to the letter (I removed all tags in the template and output only the text and link field) it seems to be working fine...strange, but true. I will keep my eye on it though, and will be reporting any further troubles.
Thanks quicksketch!

eliza411’s picture

The link field I created outputs a single <, too.

 <div class="field-item"><</div>

I started from scratch by making a new content type and inputting a single record, which displayed fine.

Then I went into contemplate's template link and selected Create Template, which included what I thought was the appropriate code to show the link, so I tried saving it. Viewing the node only output the < . . . I deleted everything in that template and tried doing what you suggested, but it made no difference as it looked just like what was there by default.

I'm wondering if you could paste your contemplate code in so I can see if I just missed some detail.

eliza411’s picture

I should have added:
I'm using contemplate.module,v 1.5 2006/06/22
cck: content.module,v 1.56.2.17 2006/08/21
and drupal Drupal 4.7.3

eliza411’s picture

FYI: I changed to using the phptemplate system rather than contemplate, and the same behavior occurs with the lone <

The link is visible and working only when neither phptemplate nor contemplate are applied to the format.

For the time being, I'm switching back to using a text field and formatting in the template. I'll check back to see if any updates happen.

quicksketch’s picture

eliza, Could you try out the latest CVS changes? These include the contributions by creazon_dev, which help a lot with the display of things. A lot of code cleanup also. Thanks!

quicksketch’s picture

Version: master » 4.7.x-1.x-dev
Status: Active » Fixed

Now that links.module handles data identical to all other CCK fields (http://drupal.org/node/92804), this should no longer be an issue.

Anonymous’s picture

Status: Fixed » Closed (fixed)