LetoDMS Community Forum
Contents Overview 3.3 getDir() - Printable Version

+- LetoDMS Community Forum (https://community.letodms.com)
+-- Forum: LetoDMS Support (https://community.letodms.com/forumdisplay.php?fid=4)
+--- Forum: Bugs/Errors (https://community.letodms.com/forumdisplay.php?fid=11)
+--- Thread: Contents Overview 3.3 getDir() (/showthread.php?tid=467)



Contents Overview 3.3 getDir() - dhandler - 03-22-2012

When I go into the Admin-Tools and select Contents Overview, for each of the documents in the folder, the following errors appear...

Notice: Undefined property: LetoDMS_Core_Document::$_document in C:\wamp\www\LetoDMS\Core\inc.ClassDocument.php on line 161

Notice: Trying to get property of non-object in C:\wamp\www\LetoDMS\Core\inc.ClassDocument.php on line 161

Notice: Trying to get property of non-object in C:\wamp\www\LetoDMS\Core\inc.ClassDocument.php on line 161

The errors seem to repeat 6 times for each document. Following the messages, the document is shown along with the owner, and size information.

The function call at the bottom of each stack is the same in all of them:
LetoDMS_Core_Document->getDir( ) ..\out.Statistic.php:127


RE: Contents Overview 3.3 getDir() - dhandler - 03-22-2012

I think I might have found the problem, but I am hoping that somebody more familiar with the code can confirm my fix or not.

Line 161 and 162 in inc.ClassDocument.php is currently:
if($this->_document->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_document->_dms->maxDirID) + 1;

I changed the lines to read:

if($this->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_dms->maxDirID) + 1;

My thought was that the maxDirID was not an inherited properly of a document, rather the DMS system as a whole. Making this change did get rid of the error messages.

Was I correct, or just lucky?

Thanks in advance.


RE: Contents Overview 3.3 getDir() - steinm - 03-22-2012

(03-22-2012, 03:43 AM)dhandler Wrote: I think I might have found the problem, but I am hoping that somebody more familiar with the code can confirm my fix or not.

Line 161 and 162 in inc.ClassDocument.php is currently:
if($this->_document->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_document->_dms->maxDirID) + 1;

I changed the lines to read:

if($this->_dms->maxDirID) {
$dirid = (int) (($this->_id - 1) / $this->_dms->maxDirID) + 1;

My thought was that the maxDirID was not an inherited properly of a document, rather the DMS system as a whole. Making this change did get rid of the error messages.

Was I correct, or just lucky?

Thanks in advance.

It is a bug and a pretty obvious one. I wonder why this hasn't popped up before.

Thanks for reporting.

Uwe