Recent Topics

User Admin Settings - Problem with one User Data

started by on Apr 05, 2017 – Last touched: Apr 11, 2017

Apr 05, 2017 20:47    

Version 6.8.8

Hello,

I tried to change admin user settings but got an error message (see below) : Requested File does not exist!
Other Users are not infected and also other user settings of this special user (like preferences etc.).

How can I manage this error?

Thanks in advance and Regards
Will

Apr 05, 2017 20:54

Please scroll to the end of the screenshot to see the error message

Apr 06, 2017 01:34

@saunders can you please enable debug info and send screenshots of the output?

Thank you.

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

Apr 06, 2017 11:42

Don't worry :D

I can't read the image. Can you send only the "Backtrace" section?

Apr 06, 2017 13:41

@mgsolipa

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

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;
	}

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?)

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.

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.

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!

This post has 1 feedback awaiting moderation...


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.