Module destroys $node_url for all node types

abatishko - September 19, 2009 - 22:20
Project:Web Links
Version:6.x-2.2
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

The function below was added in the most recent version. This appears to erase the node url for nodes of all types when it should (I assume?) just erase the node url for weblink nodes. This means that anywhere a node is displayed (for example, the front page of the site) the title just links back to the current page. Commenting out the unset line clears up the problem.

function weblinks_preprocess_node(&$variables) {
unset ($variables['node_url']);
}

#1

obris - September 20, 2009 - 15:15

I can confirm this on my website :-( (http://www.drupeda.net)

I just searched the lines to uncomment but i could not find them. Can you please tell me where i can find them? Thank you very much.

#2

NancyDru - September 20, 2009 - 17:06

I believe most, if not all of #582280: multiple issues after upgrade is also a duplicate of this.

That code was added because of #579208: Make fields available to CCK and I didn't see it doing what I wanted and should have removed it. However, now that you tell me what it is really doing, it opens an opportunity to restore an option that used to exist; I just have to check for node type properly. This is why we have -dev versions, but no one caught it, including me.

To get you going again, commenting that line (or the whole function) will do it.

@obris: search for the function name in weblinks.module and it will show up.

#3

obris - September 20, 2009 - 17:28

Thank you very much Nancy for your hint and abatishko for the fix. It works again without a problem.

#4

NancyDru - September 20, 2009 - 22:35
Status:active» fixed

I committed a change that not only fixes this problem but allows the node title to link to the URL (from another issue).

#5

ivtinkle - September 21, 2009 - 10:18

Which file needs to be edited to remove the code in #1
Gary

#6

NancyDru - September 21, 2009 - 13:55

Look at the the last line in #2. Or download the -dev version, with the permanent fix.

#7

ivtinkle - September 22, 2009 - 13:20

Thanks NancyDru.

Gary

#8

fenstrat - September 24, 2009 - 07:19

Wow. Bit of a show stopper this one. Took 2 hours to track down why node links on all our site's home page's were all broken and pointing back at the homepage itself.

Can you package up a new release?

#9

rmiddle - September 24, 2009 - 07:34

We are planing a release very soon. Just need to do a little testing should have one released by this weekend.

Thanks
Robert

#10

NancyDru - September 24, 2009 - 20:49

The more testing that is done, the faster a new release goes out.

#11

sinasalek - September 25, 2009 - 12:09

I've just tested the latest dev snapshot , i had problem with node title url and it's fixed now. everything else seems fine as well.
Thanks

#12

NancyDru - September 25, 2009 - 13:40

Thanks. Did you happen to test if setting the node title to go to the site works for you?

#13

sinasalek - September 25, 2009 - 14:07

I just did, and it works

#14

obris - September 26, 2009 - 15:44

I also made a test with -dev and it works. Tested on a spare installation with Drupal 6.14. I hope my feeback helps.

#15

NancyDru - September 26, 2009 - 23:24
Status:fixed» closed

Included in 6.x-2.3.

 
 

Drupal is a registered trademark of Dries Buytaert.