Port to 6.x

hulla - April 7, 2008 - 22:46
Project:Click Thru Tracking
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hello, did you consider porting to 6.x? There is no ad tracking module for 6.x...

#1

kbahey - April 7, 2008 - 23:40

It is not high on our list of priorities.

If someone comes up with a working patch, then we will do it soon.

If not, it will have to wait until we move our sites to Drupal 6 (which depend on views and panels, ...etc.)

#2

hutch - June 16, 2008 - 08:43

I have attached a port to D6, not tested extensively but it works on my dev setup. I haven't touched the language file at all. The biggest change is in the menu system as arg() is no longer used.

Hope this helps.

AttachmentSize
click6.tar_.gz9.73 KB

#3

kbahey - June 16, 2008 - 15:05
Version:HEAD» 6.x-1.x-dev
Status:active» fixed

Thank you!

I made slight modifications, mainly code style, and return instead of print.

6.x tarball should be available in 24 hours.

#4

hutch - June 17, 2008 - 11:45

I've just tested the 6x tarball, all is well except that the return lines on lines 143 and 176 are returning the whole page, menus, header and all. I changed them back to print statements and now it works. These lines are the same in 5x, they use print too.
As one of the modules I maintain uses 'theme('name-of-template', $content)' without print or return I tried that as well, no good I got WSOD, nothing in php.log or watchdog. I also tried 'node' instead of 'page', no good either ;-(
Quirky stuff is theming.

#5

hutch - June 17, 2008 - 13:23

found a solution:
replace line 143
return theme('page', $output);
with
return $output;

and line 176
print theme('page', theme('table', $header, $rows), t('Click Thru Report'));
with
return theme('table', $header, $rows);

This gets rid of the inappropriate print statements and works as it should IMHO.

#6

kbahey - June 17, 2008 - 17:16
Status:fixed» patch (code needs work)

Yes, even though the old way would work, the new way is better. It changed in 4.7.

Check here http://drupal.org/node/22218#handling-of-return-values-from-callbacks

Can you please roll a patch for this?

#7

hutch - June 17, 2008 - 17:52

patch attached

AttachmentSize
click.module.patch654 bytes

#8

kbahey - June 17, 2008 - 19:59
Status:patch (code needs work)» fixed

Fixed.

Thanks again.

#9

Anonymous (not verified) - July 1, 2008 - 20:13
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.