404 On certain user pages, temp fix is available here

anarchman - September 9, 2009 - 23:33
Project:RealName
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

So, I started getting a very weird problem where some user pages were returning 404s. Tracked the problem down to Realname module. I tried commenting out the hook_nodeapi bit and that did the trick for fixing it so then I added a simple test to see if we are on a user page and if so to not run, just adding on line 126 before switch ($op) the following piece of code:

[code]if (arg(0) != 'user') {[/code]

and of course adding a closing curly bracket } on line 145 in between that are already there. So the code would like this:

[code] if (!variable_get('realname_nodeapi', FALSE)) {
return;
}

if (arg(0) != 'user') {
switch ($op) {
case 'load':
// Node is being loaded.
// Save the username that is already there.
$node->realname_save = $node->name;
$account = user_load(array('uid' => $node->uid));
$node->realname = $node->name = realname_make_name($account);
$node->homepage = $account->homepage;
break;

case 'prepare':
// Node is about to be edited.
// Reset the username or save will fail.
if (isset($node->realname_save)) {
$node->name = $node->realname_save;
}
break;
}
}
}
[/code]

I can write a patch if needed, but no one else has seemed to have this problem?

Also, NancyDru, I'm cautiously willing to throw my support behind being a co-maintainer.

#1

NancyDru - October 1, 2009 - 15:38

I just gave you CVS access.

#2

anarchman - October 2, 2009 - 18:08

Sweet. Although, I imagine my role will be more along the lines of submitting and reviewing patches. I will take a look at things this weekend. Thanks Nancy.

#3

NancyDru - October 2, 2009 - 20:01

That's fine. I prefer to see the adopters of this module (especially this module) reviewing patches before they get committed. That's the way it should work.

#4

anarchman - October 6, 2009 - 19:50

Since I have your attention, what are your plans on maintenance of this module vis-a-vis real name functionality going into 7 core? I imagine you won't be making a 7.x version so all that will be required will be perfecting and maintaining the 6.x and 5.x branch yes?

#5

NancyDru - October 6, 2009 - 23:21

Have you got an issue reference. I've been following several core issues and the consensus is that core will never support a RealName feature. There are some improvements that will necessitate some changes, particularly in the theming area.

#6

NancyDru - October 8, 2009 - 20:56
Status:active» needs review

Let's see if we can get some more people testing this.

 
 

Drupal is a registered trademark of Dries Buytaert.