Closed (fixed)
Project:
Author Pane
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
9 Mar 2011 at 11:53 UTC
Updated:
3 Jan 2014 at 02:58 UTC
Jump to comment: Most recent
Comments
Comment #1
gordon commentedyou will need to tell me the error, If you can take a look in your system log and tell me the error I will be able to resolve it.
Comment #2
Shadlington commentedSorry about that - I would have told you the error if there was one. I expected an error but nothing showed up in my log (and still doesn't on repeated attempts).
That said, I played with it again and it turns out it was only happening when I set the 'User picture preset' option on the block (to anything other than blank).
Hopefully that will give you a better indication of what's going on.
Comment #3
Shadlington commentedIt seems as if the default user picture is the problem.
The problem was only happening when showing a post by someone with a default user picture instead of their own.
If I don't set a user picture preset there's no problem.
If I go to a post by a user that has uploaded their own picture there's no problem.
If I disable the default picture there's no problem.
So it seems there is this one specific case where things break down: default picture + preset applied.
EDIT: There's more to it than this! I've just been exploring this in an advanced forum issue I raised for a seemingly related problem: #1084520: "User picture preset" image style not respected
Basically, the WSOD was only happening when the path entered for the default user picture was in the format 'sites/default/files/default-picture.png'. After changing it to 'public://default-picture.png' the WSOD ceased.
However, there's another couple of issues after doing that:
1) I get the notice: "Notice: Trying to get property of non-object in include() (line 25 of /var/www/sites/all/modules/author_pane/author-pane-user-picture.tpl.php)."
2) The path linked to by the user picture in the AP block is wrong! Its linking to: http://example.com/http://example.com/.
Comment #4
gordon commentedI have tested this profile image and I can't find the issue.
If you look in Administer > Reports > Recent log messages you should see the actual error message that is being thrown by PHP.
Comment #5
Shadlington commentedI'm aware of that and as I said in #2 there are no messages in my log after the WSODs. I'm fairly ignorant of PHP settings but could it be that I need to change them? My error_reporting setting is E_ALL | E_STRICT at the moment. Not sure what else is relevant.
The only log message I am able to produce is when I change the path to the default image as described in #3, which is "Notice: Trying to get property of non-object in include() (line 25 of /var/www/sites/all/modules/author_pane/author-pane-user-picture.tpl.php)."
Might I ask where the default image you are using is located and how you have pathed to it in the account settings page? This seems to be highly relevant. Mine is in my sites/default/files/ directory and I get WSOD when it is pathed as such (though it displays correctly elsewhere).
Possibly of use is the fact that there were issues with D7 core image.module a while back that are supposedly fixed but sound related to this: #931898: View user account will down when account settings have some default picture and picture display style is not <none> & #937562: [Regression] Fatal Error Call to a member function getDirectoryPath() on a non-object when Default picture is set
Comment #6
gordon commentedI did find 1 issue with this line, and as for the error
I have not been able to work our why the account is not from an user_load() and more likely from session. I have a few other ideas and I will chase them down.
Gordon
Comment #7
Shadlington commentedGreat. Sorry to be a pain with this - I am well aware I haven't given you a great deal of info and that makes it tough to track down these things.
I'm doing my best to get as much detail on the problem as I can but if you can think of anything I could do to help you more then please let me know.
I'm a programmer myself, but not for web (I've started learning PHP but its very early days for me) so I'm really not up to speed on how to debug problems like this. Sorry :(
Comment #8
allhailtheduck commentedI was able to work around the WSOD and resulting issues stemming from adding public:// to the default image's path by adding an additional condition to the way template_preprocess_author_pane_user_picture() sets $variables['picture'] (line 262):
Original:
New:
adding the check at least stops the errors and gets all images to display. It doesn't result in a default user picture that has been processed by imagecache, however, so I've been manually setting the widths with CSS.
Comment #9
Bohemian58 commentedGetting the same error message:
Notice: Trying to get property of non-object in include() (line 25 of /.../sites/all/modules/author_pane/author-pane-user-picture.tpl.php).
Read the comments above but I'm not sure how to do this all. The pictures are alle displayed correct by the way, just getting the error message - not always though, don't know what triggers it.
Comment #10
RKS commentedOut of curiosity, since the PHP for user-picture has the "if imagecache is enabled," is it looking at the new D7 integration of imagecache? I don't know what all they changed with that integration, but the presets are different and so might there be a problem with saying enabled if there is no imagecache to be enabled? You get what I'm saying? It's late.
Comment #11
Slovak commentedSubscribe
Comment #12
Scyther commentedFor this problem
Notice: Trying to get property of non-object in include()there is a patch in this issue #1217780: Notice: Trying to get property of non-object ...Comment #13
Scyther commentedComment #14
Scyther commentedComment #15
Scyther commentedThis should now be working correctly with new commits to the dev version.