Recent Topics

1 Oct 09, 2014 03:43    

Version 5.1.2 after upgrade from 5.0.9

Using under: System | Tools | Database Maintenance Tools | "Find and delete all orphan File objects (with no matching file on disk) - DB only."
I get this error:

An invalid File object was found in the database.
It is strongly recommended to also execute the <Remove orphan file roots> tool to remove invalid files from the database and from the disk as well!

Following and executing the link does not find or correct anyting.

Using: Find and delete all orphan file roots (with no matching Collection or User) and all of their content recursively - Disk & DB.

the result is

Removing of the orphan file roots recursively with all of the content... . . . OK.
0 File roots have been removed from the disk.
0 File objects have been deleted from DB.

But the error still exists when checking again - see above action

Any idea what I have to look for to correct this?

2 Mar 24, 2015 13:27

I still have this problem with Maintainance.

Is there something that can be checked in mysql or something. But I don't not even know what this means.

Could someone explain this please. A nieuw 5.2.2. installation does not have this problem.

For me this came up after upgrading from 5.0.9 -> 5.1.2 (first time) -> 5.2.1 -> 5.2.2 (still there)

Kind regards,
Ralf

3 Mar 25, 2015 08:49

Hi @zebulon,

I'm not able to reproduce this issue, but let's try to get more information. Please do this:

1) Go to the file inc/_core/model/dataobjects/_dataobjectcache.class.php.
2) Find the function instantiate_list (line 446) and replace all its code by this one:


	function instantiate_list($db_rows)
	{
		global $Debuglog;

		$r = array();
		foreach( $db_rows as $db_row )
		{
			$obj_ID = $db_row->{$this->dbIDname};
			$r[] = ( !is_null($this->instantiate($db_row) ) ) ? 
						$this->instantiate($db_row) : 
						$Debuglog->add( $this->objtype.': Object with ID '.$obj_ID.' could not be cached', 'error' );
		}
		return $r;
	}

NOTE: you can switch this file back to its original code after the problem has been found.

3) Enable debug mode.
4) Run the "Find and delete all orphan File objects (with no matching file on disk) - DB only" and look for an error message in the debug output.

It should give you the ID of the problematic file to keep investigating the source of the problem.

Please, let us know how it's going.

Regards!

5 Mar 26, 2015 00:21

Hi @mgsolipa

1) - I replaced the function in the file
2) - in the php5.ini I switched display_errors=On, track_errors=On, log_errors=On
3) - restarted apache2
4) - Run the "Find and delete all orphan File objects (with no matching file on disk) - DB only"
5) - I did see nothing comming up of a error in the browser
6) - the error log in did not report any error - just the info of restarting apache2

I am not too familiar with debuging - maybe I did something wrong?

Please let me know if that is the case.

Thanks, kind regards,
Ralf

7 Mar 26, 2015 22:26

Hi @mgsolipa

Alright - 'now we are talking'
There is a nice debug output at the end of each pageload.

When I click on "Find and delete all orphan File objects (with no matching file on disk) - DB only."

the only error it shows is this:

error:
File: Object with ID 9 could not be cached

Everything else seems to be fine - nothing else with error messages.

And this is the whole output:


Edited... I guess we don't need these details.

Is there anything revealing?

Regards,
Ralf

8 Mar 28, 2015 11:36

@zebulon all right, now that we have the conflictive file's ID, you can go to the database and look into the table T_files for the record where file_ID = 9. Please share the content of that record to keep investigating the problem.

Regards!

9 Mar 29, 2015 01:47

Hi @mgsolipa

I guess the table in my db is called 'evo_files', there is no 'T_FILES' table.

file_ID=9
file_root_type=collection
file_root_ID=2
file_path=/Documents
...

Compared to all other entries that contain a path - none starts with a '/'.
So I removed the '/' and tried again: "Find and delete all orphan File objects (with no matching file on disk) - DB only" - and now there is no error anymore.

If everything else keeps working as expected, I guess we found the issue.
THANK YOU so far for your assistance.

I will see next 1 or 2 working days if all is fine and will let you know.
Kind regards,
Ralf

10 Mar 30, 2015 10:32

Hi @mgsolipa

No issues detected anymore. Guess we can close this topic.
Unless you have any questions.

Thanks voor the support.

Regards.


Form is loading...