Infinite loop/white screen when used with token.module

quicksketch - April 25, 2007 - 07:10
Project:Link
Version:5.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

I'm just making an issue here for the referencing of all link.module users.

When using link.module and token.module together to create any sort of dynamic titles/URL. You will get a white screen or PHP infinite loop error when viewing the node containing the link field or editing the link field configuration. This is a bug with token module: http://drupal.org/node/129338. Currently it does not have a resolution.

As a workaround until the issue is solved, I'm using this patch to avoid the loop though you can't use the "view" token within any CCK field.

Index: token_cck.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/token/Attic/token_cck.inc,v
retrieving revision 1.1.2.6
diff -u -r1.1.2.6 token_cck.inc
--- token_cck.inc 14 Apr 2007 12:39:59 -0000 1.1.2.6
+++ token_cck.inc 25 Apr 2007 07:09:05 -0000
@@ -7,7 +7,7 @@
   $tokens = array();
   if ($type == 'node') {
     $node = $object;
-    content_view($node);
+    //content_view($node);

     $field_types = _content_field_types();

As you can see I just comment out the content_view() function in token_cck.inc. This only applies to 5.x as I don't think this file exists in the 4.7 version of token.module.

#1

aaron - August 9, 2007 - 19:13

not sure that's the best solution. we'll want to fix this before d6, since token will be included as core.

#2

aaron - August 9, 2007 - 19:51

looks like applying the patch at #12 for http://drupal.org/node/129338 works like a charm for this issue.

#3

quicksketch - August 17, 2007 - 03:18

I'm pretty sure there aren't any (immediate) plans for including token in core. It's clearly and API feature, and code freeze was July 1.

See: http://drupal.org/node/113614

#4

RobRoy - August 30, 2007 - 04:35
Status:active» duplicate

Ya, this has been fixed in token module and will be in next token module release. That issue solved the problem for me.

 
 

Drupal is a registered trademark of Dries Buytaert.