This project has moved. For the latest updates, please go here.
1
Vote

NullrefException with $macros.Gravatar

description

I used a style "traction" with a post.view definition like this...

$macros.Gravatar($comment.Email, $comment.Name, $comment.IPAddress, "%{size ='39'}")

Now I have (migrated) Posts with comments, where eighter email, Name and/or ipaddress are null/empty, and I cannot Display the post without an error from the Graffiti macro engine.

This code temporaryly fix the issue for now:

$macros.Gravatar("$comment.Email", "$comment.Name", "$comment.IPAddress", "%{size ='39'}")

But theme Designers did not know about this - and so producing "non-working" themes out of the box.

comments

jkillebrew wrote Nov 4, 2013 at 9:28 PM

This is working for me without the extra quotes. Maybe get the contents of those variables and check them for unusual or unacceptable characters, maybe a comma?

TorstenR wrote Nov 5, 2013 at 6:17 AM

I don't think so: I get a Nullrefexception. I know this because I had the same issue while Import/Migration. See the patch I uploaded - there I had to to check for null within the XML processing to get Posts and comments imported. They are now at the DB. Where should I look? Directly within the DB? Please send me a query to check, I don't know the real structure...