-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trying to get property of non-object #136
Comments
Hi there - sorry for the delay, I was out at a conference. Which branch did you grab, dev or master? When you see "Trying to get property of non-object", does it give you a line number or file number in the error? |
Maybe I can add to this. I'm getting the same error. I get an error anytime I click a user that has assets assigned. here is my log-apache2handler if that helps [2014-05-09 18:18:19] local.ERROR: exception 'ErrorException' with message 'Trying to get property of non-object' in /var/www/html/snipe/app/storage/views/489d70106fe6d379bc30d8c5385026ca:144 Next exception 'ErrorException' with message 'Trying to get property of non-object (View: /var/www/html/snipe/app/views/backend/users/view.blade.php)' in /var/www/html/snipe/app/storage/views/489d70106fe6d379bc30d8c5385026ca:144 |
Can you tell me what error you see on screen? |
server error 500 |
Are you running this as production or local? If you run it as local, you'll see a more useful error message on screen. |
I think production. I'm not the one that did the original setup. If it can be changed to local I'll see about doing that. This is from the 0.32 release |
Okay - if you can run it as test or local, that would definitely help me to help you. It should show you a line number with the offending bit, and I can help you debug from there. |
(When it's in production mode, it gives more user-facing, generic error messages - dev/test mode gives a full stack trace and more detailed debugging.) |
I hate to ask, but is there an easy way to switch between the two? |
No worries :) Easiest way is to adjust the environment settings here: |
Hmm followed that but I still get generic errors. I'll have to try later. Busy day. :( |
It will default to production if the hostname doesn't match, so that may be part of the problem. When you type |
Yeah it matches exactly, and only the section that says local. On Fri, May 9, 2014 at 12:41 PM, snipe notifications@github.com wrote:
|
Hmm, okay. A few more questions for both of you if you get a chance:
If you remove the following:
from I'm having a hard time reproducing it on my end, so I'm trying to isolate the use cases. :( |
Sorry for the lack of info. I find out what I can. On Friday, May 9, 2014, snipe notifications@github.com wrote:
|
No problem - sorry you're having trouble. PS - I edited your comments to remove your phone number, for probably obvious reasons. I think it was included because you replied via email, and it's in your sig. |
Thanks for the edit! Also, it was only happening to users with software assets assigned, users with hardware were okay. |
That does help, thank you! I'll get a patch out for you shortly. I appreciate you taking the time to help troubleshoot. Sucks when you can't reproduce an error locally. |
Thank YOU! This project is exactly what I needed. |
Can you try adding this bit of code after line 139 on
If this works, that's really weird. That statement should only evaluate to true if the asset itself or the entry in the log table is missing, which should never happen, since assets are marked as deleted, but never truly deleted. Edit: Updated to correct the code. Use this version, not the one you were emailed with the github response. |
Tried the new code. I get the original error when I use it. |
Dammit. :( Thanks. Stay tuned. |
Try this?
So sorry for all this back and forth. I still can't repro, so I'm still flying blind. :( |
No prob. Happy to help This one works perfectly. |
Excellent! I'll submit this patch into dev and master, so the next time you grab code, the fix will be in there. Really appreciate all of your help! |
After creating a software license and checking it out I am no longer able to view assets/software checked out be that user. Checking in the software does not correct the problem. Below is the error log that it returned:
Server/Request Data
Apache/2.2.22 (Ubuntu) Server at 192.168.202.5 Port 80HTTP_HOST 192.168.202.5
HTTP_USER_AGENT Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0
HTTP_ACCEPT text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8
HTTP_ACCEPT_LANGUAGE en-US,en;q=0.5
HTTP_ACCEPT_ENCODING gzip, deflate
HTTP_REFERER http://192.168.202.5/public/index.php/admin/users
HTTP_COOKIE laravel_session=icomggq1occghua1ehaaifono0
HTTP_CONNECTION keep-alive
PATH /usr/local/bin:/usr/bin:/bin
SERVER_SIGNATURE
SERVER_SOFTWARE Apache/2.2.22 (Ubuntu)
SERVER_NAME 192.168.202.5
SERVER_ADDR 192.168.202.5
SERVER_PORT 80
REMOTE_ADDR 192.168.101.17
DOCUMENT_ROOT /var/www
SERVER_ADMIN webmaster@localhost
SCRIPT_FILENAME /var/www/public/index.php
REMOTE_PORT 59536
GATEWAY_INTERFACE CGI/1.1
SERVER_PROTOCOL HTTP/1.1
REQUEST_METHOD GET
QUERY_STRING
REQUEST_URI /public/index.php/admin/users/1/view
SCRIPT_NAME /public/index.php
PATH_INFO /admin/users/1/view
PATH_TRANSLATED /var/www/admin/users/1/view
PHP_SELF /public/index.php/admin/users/1/view
REQUEST_TIME 1398370638
GET Data empty
POST Data empty
Files empty
Cookies
laravel_session icomggq1occghua1ehaaifono0
Session
_sf2_attributes Array ( [_token] => xhQ3pzDeUsUO6nzqqqDtoNRYmMtyQ8KvLgnzAEeW [flash] => Array ( [old] => Array ( ) [new] => Array ( ) ) [cartalyst_sentry] => Array ( [0] => 1 [1] => $2y$10$u49S9HrVMERGLONV82JNAOWRKimI89kITn38HprJ3w0gHFlq1DYnK ) )
_sf2_flashes Array ( )
_sf2_meta Array ( [u] => 1398370638 [c] => 1398364213 [l] => 7200 )
Environment Variables empty
Registered Handlers
The text was updated successfully, but these errors were encountered: