Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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).
Comment | File | Size | Author |
---|---|---|---|
#6 | 1322096.patch | 891 bytes | darksnow |
Comments
Comment #1
Liam McDermott CreditAttribution: Liam McDermott commentedFWIW, 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!
Comment #2
Liam McDermott CreditAttribution: Liam McDermott commentedJust committed a fix for this, seems
safe_value
doesn't exist for some body field values.Comment #3
Liam McDermott CreditAttribution: Liam McDermott commentedComment #5
darksnow CreditAttribution: darksnow commentedI 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).
Comment #6
darksnow CreditAttribution: darksnow commentedI 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.
Comment #7
GStegemann CreditAttribution: GStegemann commentedThanks. The patch seems to work so far.
But there is an other error in module Advanced Forum. Therefore I cannot fully verify it.
Comment #8
alexpsfti CreditAttribution: alexpsfti commentedHi,
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
Thanks for any help.
Comment #9
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedLooks 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
Comment #10
alexpsfti CreditAttribution: alexpsfti commentedThanks, seems to work.
Comment #11
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedGot the "<"?
Comment #12
Clearbrook CreditAttribution: Clearbrook commentedWell, 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...
Comment #13
Liam McDermott CreditAttribution: Liam McDermott commentedI'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!