1 saunders Apr 05, 2017 20:47
3 mgsolipa Apr 06, 2017 01:34
@saunders can you please enable debug info and send screenshots of the output?
Thank you.
4 saunders Apr 06, 2017 09:56
@mgsolipa Seems I have problems to figure out how to enable debug mode.
In _advanced.php I set the pwd (d94110) and called the page:
http://www.npo-consulting.net/blogs/admin.php?ctrl=user&user_tab=profile&user_ID=1?debug=****
but what I get is the error message, that I used invalid parameters.
Please, could you help me to get the debug running?
(And of course, please set this message public after debug mode worked an I had a chance to change the pwd ;-)
Thank you
5 mgsolipa Apr 06, 2017 11:15
@saunders try this URL: http://www.npo-consulting.net/blogs/admin.php?ctrl=user&user_tab=profile&user_ID=1&debug=d94110
When there are parameters in the URL (the character ? is already in it), you need to add the debug=x
part preceded by &
instead of ?
Don't worry about your comment, we can just delete it after solving the issue.
6 saunders Apr 06, 2017 11:34
@mgsolipa shame on me. sry (seems I had a mental block ;-).
Following you'll see the debug screenshot
Thanks
7 mgsolipa Apr 06, 2017 11:42
Don't worry :D
I can't read the image. Can you send only the "Backtrace" section?
8 saunders Apr 06, 2017 13:41
Backtrace:
debug_die( "Requested File does not exist!" )
File: /*****/inc/_core/model/dataobjects/_dataobjectcache.class.php on line 584
DataObjectCache->get_by_ID( "6" )
File: /*****/inc/users/model/_user.class.php on line 1954
User->get_total_upload( )
File: /*****/inc/users/model/_user.class.php on line 6156
User->get_reputation_total_upload( )
File: /*****/inc/users/views/_user_admin.form.php on line 348
require( "//inc/users/views/_user_admin.form.php" )
File: //skins_adm/_adminUI_general.class.php on line 714
AdminUI_general->disp_view( "users/views/_user_admin.form.php" )
File: /*****/inc/users/user.ctrl.php on line 926
require( "//inc/users/user.ctrl.php" )
File: //admin.php on line 224
Ignored last: 1
9 mgsolipa Apr 08, 2017 10:27
@saunders a similar issue has been addressed here: https://github.com/b2evolution/b2evolution/commit/a7928056ce7f96003deeaca72e287ebadd65a40d.
Can you please apply the patch and tell us if it solves your issue?
Thank you.
10 mgsolipa Apr 08, 2017 10:33
@saunders if you don't know how to apply the patch, just open the file: inc/users/model/_user.class.php
, find this line function get_total_upload( $type = NULL )
and replace all the code within the braces (including them) immediately underneath it with this new code:
{
if( empty( $this->ID ) )
{ // User must be saved in DB:
return 0;
}
$FileCache = & get_FileCache();
$FileCache->clear();
$files_sql_where = 'file_creator_user_ID = '.$this->ID;
if( $type !== NULL )
{ // Restrict files by type:
global $DB;
$files_sql_where .= ' AND file_type = '.$DB->quote( $type );
}
$FileCache->load_where( $files_sql_where );
$total_upload_size = 0;
foreach( $FileCache->cache as $user_File )
{
$total_upload_size += $user_File->get_size();
}
return $total_upload_size;
}
11 saunders Apr 08, 2017 11:31
@mgsolipa I get this Error-Line: Fatal error: Call to a member function get_size() on null in /home/.sites/383/site150/web/blogs/inc/users/model/_user.class.php on line 1956
PS: the bug only occurs on one special user account. All others work pretty fine. So I ask myself to shortcut the problem by deleting the user. (But may be the problem then will escalate?)
12 mgsolipa Apr 08, 2017 11:53
@saunders it would appear again if we don't fix it, or at least find an explanation about why it's happening. Please, give us a bit more time to figure out the source of the problem before to just delete the user.
13 mgsolipa Apr 11, 2017 11:30
All right @saunders, I think I [finally] found an explanation for this issue.
Can you please see the table T_files
at your database, and look for the row where file_ID=6
.
1) Does the file_root_ID
value of that row match with the ID of a collection that you have (recently or not) deleted from your site?
2) Does the file_root_ID
value of that row match with the ID of any of your existent collections?
Answer should be "YES" and "NO". If not, I would be back to the starting point ;)
If so, just go to System > Maintenance > Cleanup tools (http://b2evolution.net/man/back-office-reference/system/system-maintenance-tab/tools-tab/) and click on: Find and delete all orphan file roots (with no matching Collection or User) and all of their content recursively - Disk & DB. This would solve your current issue and avoid further similar issues.
14 saunders Apr 11, 2017 12:08
@mgsolipa That made my day ;-) (YES, NO and Tools) now user admin page loads proper. Thank you very much! Great work, great support!
Please scroll to the end of the screenshot to see the error message