After upgrading to the D7 version I see the following message when accesing content on my site:

Notice: Undefined index: safe_value in signature_forum_node_view() (Zeile 605 von /var/www/html/cm7/sites/all/modules/signature_forum/signature_forum.module).
CommentFileSizeAuthor
#6 1322096.patch891 bytesdarksnow
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Liam McDermott’s picture

FWIW, a notice shouldn't cause any problems with the site (and showing errors can be turned off in Drupal's configuration). Having said that this should still be fixed.

Thanks for reporting this!

Liam McDermott’s picture

Just committed a fix for this, seems safe_value doesn't exist for some body field values.

Liam McDermott’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

darksnow’s picture

I know this was a while ago, but I'm getting the same error, but in a different function.

Notice: Undefined index: safe_value in signature_forum_comment_view() (line 639 of sites/all/modules/signature_forum/signature_forum.module).

darksnow’s picture

FileSize
891 bytes

I had a look in the CVS repo and found your last checking, which dealt with this issue for nodes.

I've attached a patch which does exactly the same thing for comments.

GStegemann’s picture

Thanks. The patch seems to work so far.

But there is an other error in module Advanced Forum. Therefore I cannot fully verify it.

alexpsfti’s picture

Hi,

I have the same error line 639. Ive tried to apply the patch without success. I put the file in the signature_forum folder. I did a patch -p0 1322096.patch but it freezes. Same without -pnum option. I have to cancel with CTRL+C.

Im running Debian 6, drupal 7.

My error message is

Notice: Undefined index: safe_value in signature_forum_comment_view() (line 639 of /var/www/sites/all/modules/signature_forum/signature_forum.module).

Thanks for any help.

Niklas Fiekas’s picture

Looks like it's a p1 style patch (which is btw. the default in Git and what the d.o testbots expect), not p0.

It freezes because it needs input from stdin. So you have to pipe the file in.
patch -p1 < 1322096.patch

alexpsfti’s picture

Thanks, seems to work.

Niklas Fiekas’s picture

Got the "<"?

Clearbrook’s picture

Well, I was able to manually apply the patch and it worked fine. However, it would be nice for this to be added to the Dev version, so that it is easier to update using the built-in update mechanism of Drupal 7. Not everyone is going to be able to access the command line, and even fewer still will be able or daring enough to attempt a manual patch of the file. It would make this module better, in any case, so I see no reason not to make the commit to get this done. Sure, this is just an annoyance bug, as best as we can see.

Me, I am happy that I could fix this in my installation. Should the next update not have this, I would be annoyed to have to do this again...

Liam McDermott’s picture

Title: Undefined index: safe_value in signature_forum_node_view() » Undefined index: safe_value in signature_forum_node_view() (and signature_forum_comment_view())
Status: Closed (fixed) » Fixed

I've committed the patch in #5: thanks darksnow!

Just for future reference: if a bug is marked ‘closed’, it isn't visible in the issue queue (by default), so I had no idea this was awaiting my attention. So, for best results, mark an issue with a patch ‘needs review’ or if a large number of people have tested it, mark it ‘reviewed & tested by the community’.

I did make a small amendment to the patch posted by darksnow: I added back in the call to strip_tags() when calculating the length of the content (in both comments and nodes). I don't think it's really fair to count markup when restricting the length of a signature.

If someone has a good reason why this is a bad idea, don't hesitate to create a new issue!

Thanks again, everyone!

Status: Fixed » Closed (fixed)

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