DMS setup bug - Need help

DMS setup bug - Need help

Julian Ridden གིས-
Number of replies: 41

I am trying to install DMS on the latest 1.5 and am having issues.

The install goes fine with no errors generated. I can also access the DMS.

In the DMS screen I can see the folders have been creted for each usre and can administer each of them.

My issue occus when I try to upload a file. I get the following error.

There was a problem while trying to commit data to your database. Please check that it is functioning properly and retry.
At this point the entire DMS breaks and my folder menu will no longer generate..in fact it just dies completely.
Is there a setup step I have missed or botche up?
Thakns
JR
དཔྱ་སྙོམས་ཀྱི་སྐུགས་ཚུ།: -
In reply to Julian Ridden

Re: DMS setup bug - Need help

John Papaioannou གིས-
I hope you didn't miss the step that said "visit www.yoursite.com/dms/setup.php". smile

If you did that, then in if you take a look at your database (e.g. with a tool like PHPMyAdmin) you should see 5 tables with names like mdl_dms_xxx. Can you do that and make sure that they exist?

Jon
In reply to John Papaioannou

Re: DMS setup bug - Need help

Julian Ridden གིས-

Hey Jon

Yes the setup script was run successfully and all tables were created.

Any other ideas?

In reply to Julian Ridden

Re: DMS setup bug - Need help

John Papaioannou གིས-
No idea then. For some reason the database commits fail. You could try to insert

$GLOBALS['db']->debug = true;

at some appropriate place so that you get to see every query on screen. This will then tell you which query fails and why. But we 're talking full-blown debugging here.

Jon
In reply to John Papaioannou

Re: DMS setup bug - Need help

Julian Ridden གིས-

Jon,

does "error in constructing vanilla" mean anything to you?

I have checked the mdl_dms_folder_vanilla folder and the data is created, but nothing appears in the folder

Full Texts id name comment
Edit Delete 1tesatgdfgdfggf

The "dmsfiles" folder has been set to 777 in case you were wondering

I would love to see this working but it seams that DMS and 1.5 just don't want to play nice

In reply to Julian Ridden

Re: DMS setup bug - Need help

John Papaioannou གིས-
It makes me unhappy to say this, but unfortunately I don't currently have the time to take a good long look into this problem. And there is a good reason for it.

Currently we 're all doing our best to get 1.5 out of the door, which has turned out to be a much more consuming task than it looked like. Therefore, I don't feel I can spend time on finding and solving this bug (which may not be a bug at all but something else entirely) to make DMS work with 1.5, considering that 1.5 doesn't even exist yet.

Again, I 'm sorry to disappoint you. Maybe we can take a look at this after Moodle 1.5 is released.

Jon
In reply to John Papaioannou

Re: DMS setup bug - Need help

Julian Ridden གིས-
No offence taken. As always I am aware of the risks of taking a development product.
And I certainly do not wish to stand in the way of getting 1.5 out of that phase and into Stable release.

Hope all goes well and i will continue to see if I can nut this one out myself.

Julian
In reply to Julian Ridden

Re: DMS setup bug - Need help

Marcus Schubert གིས-
Hi,

im using the DMS under 1.5 dev or at least i tried to winken It seems a bigger problem but it works just fine under 1.4 So keep on working on this, if you have more time Jon Breites Grinsen
I think its a great functionality.

Regards

Marcus
In reply to Julian Ridden

Re: DMS setup bug - Need help

Julian Ridden གིས-
Just out of interest, has anyone got this working on a 1.5 moodle install?
In reply to Julian Ridden

DMS setup bug - Need help

Asif iqbal གིས-
hi Julian,

I'm working on Moodle 1.5. I'm also facing these problems.
      "Database Write Failed
There was a problem while trying to commit data to your database. Please check that it is functioning properly and retry."

"error in constructing vanilla"

How did you solve these problems.

Thanks
In reply to Julian Ridden

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi,
I am not sure if anyone is still interested in myDMS and moodle 1.5 but I did some debugging last night and wanted to share my findings with you.

The main problem of moodle 1.5 and myDMS is based on the fact that the function to insert records in the database (insert_record () in lib/datalib.php) has changed. Values of the id field can no longer be specified by a function. The id variable is being unset in datalib.php to ensure a consistent database, but that is the reason dms is not working. When folders or documents are beeing created a wrong id is written (everything is starting with id 1), hence 'error in constructing vanilla'.
For debugging I deactivated the unset-function for the id field and it worked but since I did not want to mess with moodle core functions I modified the dms tables by adding a new field, holding the right node id.

Apart from the above problem it's just the function mimeinfo() which is called in interface/moodle/dms.class.php that has been relocated in the moodle core from /lib/mimetypes.php to /lib/filelib.php.

I'm still testing but so far it looks good. So if you need any help with the changes, feel free to  contact me. I think I will upload the modified code in a few days after I have tested it.

cheers ali
In reply to Ali Banani

Re: DMS setup bug - Need help

Adam Johnston གིས-
I would love to have the modified code!  I have been looking forward to a good DMS for 1.5, but they just haven't seem forthcoming.  Thanks for your work to get it going with 1.5!
mrjohnston
In reply to Ali Banani

Re: DMS setup bug - Need help

Luuk CARNEL གིས-
Yes,  that would be great, if you could get DMS working for 1.5 !!!
I think a lot of people are waiting for the possibility to let students manage their own study-documents within Moodle !

Please share your code asap !

Thanks & Ciao !

Luuk
In reply to Ali Banani

Re: DMS setup bug - Need help

Just H གིས-
Hi Ali

I too am looking for some kind of DMS to integrate with Moodle so would like to also offer my thanks for the time you are putting into this.

I look forward to you releasing it smile
In reply to Ali Banani

Re: DMS setup bug - Need help

John Papaioannou གིས-
If you publish your changes in a well-documented way (or, even better, as unified diffs from CVS against the DMS version in CVS /contrib/), I 'll make sure that the changes are included in CVS. This way everyone would simply be able to download the fixed version without any extra trouble. smile

Cheers!
Jon
In reply to John Papaioannou

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi,
here is the cvs diff patch to get dms working with moodle 1.5. I tested it on moodle 1.5 and 1.4 but I'm sure I forgot something དགའ་འཛུམ་ (haven't had much sleep lately)

Don't forget to drop all mdl_dms tables before running setup.php, because a new field has been added to a few tables.

cheers and good night .... ali
In reply to Ali Banani

Re: DMS setup bug - Need help

Adam Johnston གིས-
I tried to apply the changes and install, but when I go to run setup.php it tells me "Could not load required module: lang"

Not sure if it's my setup causing problems or what, but I figured I'd let you know in case there was something else needed to be patched or if I missed something maybe.
In reply to Adam Johnston

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi Adam,

which moodle version are you using?
Is the dms folder located in the moodle root directory?
Does the file dms/interface/lang.class.php exist and is it readable by the webserver?


In reply to Ali Banani

Re: DMS setup bug - Need help

Adam Johnston གིས-
I have the file in dms/mydms/interface/moodle/

Its permissions are 777 so writing or reading shouldn't be an issue

The only thing potentially not standard is my install is actually setup at www.domain.com/moodle and not there the domain root is the moodle folder.  I know initially I got some other errors, but I just had to add ../ in front of some pointers and then those errors went away.  Then I got the language error. 

If you need more info just let me know what you want me to do and I can start from scratch with it or modify whatever needs it.

If you think it could be something not changed and want to know for sure just email files to mrj@mrjohnston.org and I can see if different files work ok too if you want.  Whatever I can do to help.

Thanks for  your time and work.
In reply to Adam Johnston

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi Adam,

the lang-module problem occures because you apparently changed your dirroot-pointer. If your site is operating at www.domain.com then your config.php in your moodle root-directory should contain information about your web and directory root. The dms code is using these global variables to find the appropriate modules.
For example my moodle code resides in /var/www/moodle, so my config.php looks like this:
$CFG->wwwroot   = 'http://www.domain.com';
$CFG->dirroot   = '/var/www/moodle';

The modules are loaded in dms/interfaces/moodle/dms.class.php. So you can try adding a ../ in front of $DMS->_settings['root_dir'] = $CFG->dirroot.'/dms/';
But I would recommend using the correct pointers and finding out why you got the error messages in the first place.

 

In reply to Ali Banani

Re: DMS setup bug - Need help

Adam Johnston གིས-
I went back to the standard files and the error is this

Warning: main(../config.php): failed to open stream: No such file or directory in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/dms/mydms/interface/moodle/dms.class.php on line 4

Its not seeing config.php. I had placed an additional ../ in front of this in dms.class.php and thats when I get the language problem.

In config.php I have the following
$CFG->wwwroot = 'http://cahs.info/moodle';
$CFG->dirroot = '/mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle';
So I thought it was setup correctly as dirroot is pointing to my moodle folder and dms is right inside my moodle folder.

Is one of my files incorrect then? I am sorry for being an idiot if I am, I just don't know based on what you said how to get it to work without changing the dms.class file and giving me the other error.  By the way its 1.5.2+

mrjohnston
In reply to Adam Johnston

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi,

no your config files are all correct. But from the warning message I can see that you have a mydms folder inside the dms folder which is not correct. Copy the downloaded mydms folder into your moodle folder and rename it to dms. Thats why you had to add a ../ because you had an extra folder inside your folder tree.
In reply to Ali Banani

Re: DMS setup bug - Need help

Adam Johnston གིས-
Well I tried again now that I realized what I screwed up.  Screwed up badly.  So I now have the correct directory structure and it installed fine, gave me the OK.  Yet when I go to cahs.info/moodle/dms to try and access it I get the following error:

Warning: Invalid argument supplied for foreach() in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/lib/weblib.php on line 1706

Warning: print_header(/header.html): failed to open stream: No such file or directory in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/lib/weblib.php on line 1858

Warning: print_header(/header.html): failed to open stream: No such file or directory in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/lib/weblib.php on line 1858

Warning: print_header(): Failed opening '/header.html' for inclusion (include_path='.:/usr/local/lib/php') in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/lib/weblib.php on line 1858

invalid course

Warning: print_footer(/footer.html): failed to open stream: No such file or directory in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/lib/weblib.php on line 1969

Warning: print_footer(/footer.html): failed to open stream: No such file or directory in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/lib/weblib.php on line 1969

Warning: print_footer(): Failed opening '/footer.html' for inclusion (include_path='.:/usr/local/lib/php') in /mounted-storage/home5/sub004/sc12767-ZXZI/www/cahs/moodle/lib/weblib.php on line 1969

What did I screw up now?  Only thing that comes to mind is that all the lines refer to styles or themes and more specifically seem to revolve around the footer.  So is it my theme (clouds) maybe thats causeing this?
In reply to Adam Johnston

Re: DMS setup bug - Need help

Andy Tagliani གིས-
Are the new files downloading into cvs? If you, Jon find the time a short message are welcome. Thanks for sharing your modul with us !!!

Bye Andy
In reply to Ali Banani

Re: DMS setup bug - Need help

Julian Ridden གིས-
WOOHOO...YEEHAAAA...YAYYYYY!!!

You get the gist.

This works perfectly. Thankyou so much for the patch. I will have a demo of this in the Playpen shortly.
In reply to Ali Banani

Re: DMS setup bug - Need help

John Watson གིས-
Hi,

At the risk of sounding like a total newbie, how would I apply the dms patch?
Up till now with patches I just manually made the changes but the dms patch is so extensive it's confusing to do manually.

I'm guessing that I need to install CVS and use some Diff tool or command.

Just installed the dms module from CVS but am getting the 'vanilla' error.
Using Moodle 1.5.2 (2005060220) , running on XP using EasyPHP.

Any help is appreciated.

Regards,
John (wanting to experience that  WOOHOO...YEEHAAAA...YAYYYYY!!! feeling
that Julian has མིག་ཁྱབ་
In reply to John Watson

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi John,

you would need a windows version of the diff application. I have never used one but I know there a few on the net.

I have also gzipped the cvs version with my patch applied. You can find it here.

cheers ali
In reply to Ali Banani

Re: DMS setup bug - Need help

Andy Tagliani གིས-
Hi Ali

My problem now:

Warning
: move_uploaded_file(/var/www/virtual/xxxxx/htdocs/moodle/dmsfiles/c43126befbc9bd8a7c2b3276a39eb71b): failed to open stream: No such file or directory in /var/www/virtual/xxxxx/htdocs/moodle/dms/inc/inc.ClassDocument.php on line 514

Warning: move_uploaded_file(): Unable to move '/tmp/phpBQZS36' to '/var/www/virtual/xxxxx/htdocs/moodle/dmsfiles/c43126befbc9bd8a7c2b3276a39eb71b' in /var/www/virtual/xxxxx/htdocs/moodle/dms/inc/inc.ClassDocument.php on line 514

safe_mode is off and, tmp exist and i habe enough rights, some ideas?

Bye Andy
In reply to Andy Tagliani

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi,

did you create the moodle/dmsfiles directory with the right permissions (chmod 777)?


In reply to Ali Banani

Re: DMS setup bug - Need help

Andy Tagliani གིས-
Hi Ali

Thanks for answer and many thanks for sharing your knowledge with us. My problem is solved, our Admin works on server at this time, everythings fine and works great.

Thanks again!
Bye Andy
In reply to Ali Banani

Re: DMS setup bug - Need help

John Watson གིས-
Ali,

You are incredible. All is fine now! I do have a question though, apparently
none of the revision control features that myDms has are implemented.
Have they been removed from your integration?
Can they be added easily?  Maybe by using (parts of) the MyDms release (1.4.3.)?

Thanks again for your support.

Regards,
John


In reply to John Watson

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi John,

I did not code this version of dms. I think Jon Papaioannou developed it from scratch because most of the mydms code could not be implemented in moodle (and he made it php 5 ready). So thats why this is still an alpha release.
I just provided the patch to make it work on moodle 1.5. I don´t know what the development status on mydms for moodle currently is but I sure would like to contribute.
I am currently working on the revision control and I will of course provide my code as soon as its ready.

ali
In reply to Ali Banani

Re: DMS setup bug - Need help

John Watson གིས-
Hi Ali,

Sorry for the mixup blush. Let me know if you need someone to beta test your revision control code smile.

Regards,

John
In reply to Ali Banani

Re: DMS setup bug - Need help

Peter DeBruyn གིས-

I tried to execute /dms/setup.php, files from CVS, and got the following error:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting T_STRING or T_VARIABLE or '{' or '$' in /home/n2w3/public_html/pm/dms/inc/inc.Settings.php on line 42

Line 42 reads:    $db->debug = true;

The only modification from the normal install was putting the data directory outside of html directory as follows /inc/inc.settings.php: 

       // You can change these to match your own installation directories
        // It is perfectly safe to pick your moodle dataroot for _contentDir.
        global $CFG;
        $this->_rootDir = $CFG->dirroot.'/dms/';
        $this->_httpRoot = $CFG->wwwroot.'/dms/';
        $this->_contentDir = $CFG->'/home/n2w3/dmsfiles';
        $this->_ADOdbPath = $CFG->dirroot.'/lib/adodb/';

/*

Any ideas how to get past the parse error?

In reply to Peter DeBruyn

Re: DMS setup bug - Need help

Ali Banani གིས-
Hi Peter,

if you would like to change the location of the dmsfiles folder, the correct line shoud read like this:

$this->_contentDir = '/home/n2w3/dmsfiles/';

No $CFG variable and  with a trailing slash!

ali
In reply to Ali Banani

Re: DMS setup bug - Need help

Genner Cerna གིས-
is there a package of DMS for 1.5.2+?