Community Support for OpenDocMan (Deprecated)
Check in error.... - Printable Version

+- Community Support for OpenDocMan (Deprecated) (https://forum.opendocman.com)
+-- Forum: OpenDocMan Community Discussion (https://forum.opendocman.com/forum-5.html)
+--- Forum: OpenDocMan Support - Community Based (https://forum.opendocman.com/forum-6.html)
+--- Thread: Check in error.... (/thread-67.html)



Check in error.... - Stephen - 01-13-2010

cervant
2007-05-31 08:22:20 PDT
I could check out, download and edit the files by clicking check-out, but when I want to check in I get the below error

Error: wrong file! Please check in the right file.
Why?
Please Help me...


logart
2007-05-31 08:27:24 PDT
You must have re-named the file?

steve


jonathanwminer
2007-05-31 08:27:27 PDT
Did you happen to change the filename while editing?

I believe that ODM requires that the file being checked in has the same name as the file that was checked out.


cervant
2007-06-01 08:15:42 PDT
Hi again,
I tried some variation but the problem still continues;
1- after I download the file, I edit the document but did not change the file name. it gave error
2- I also changed the file name again gave the error
3- I also tried to upload the file without making any change again gave the error

Where do u think is the problem?
What do you think I should check?

Many thanks for your support...


logart
2007-06-01 08:21:40 PDT
To verify the file name is unchanged try adding the following line to add.php at line 347:

echo $_FILES['file']['name'];exit;

That will display the file name that ODM is receiving from the upload.

steve


cervant
2007-06-04 04:02:42 PDT
First of all, thanks for your help Logart

between which codes should I insert the code you have given.
if you could let me know the code after it and the code before it I could then insert it between them

on the other hand I have realised that if I check in and check out old docs, I recieve error
but when I add a new document the check in and check out gives no error.
what do you think is the reason I recieve error for the old uploaded files?
once I have moved the "DataDir" from webroot to another folder, for security, could this be the reason?
and if so how could I correct it?

Regards...


redsand_vb
2008-02-15 14:09:29 PST
I think that this check in error my be something similar to what I have exprienced and it appears that for some reason that when a documents is uploaded with spaces in the file name when it is then checked out I noticed that underscores were placed where the spaces should have been. Now being that the original document file name had spaces and not underscores it was giving a check in error. However, I found that if I renamed the file and put the spaces back in I was able to check in the document just fine. I am not sure what causes ODM to put in the underscore character when checking out the document when the original file name has spaces. Hey logart is there anything on the php or mysql side I need to edit to resolve this issue. Note I am running ODM on Mandriva 2008 with apache 2.2.8, PHP 5.2.5, mysql 5.0.51a.


mick_sp
2008-03-28 12:21:26 PDT
I think i half-tackled this one. It's a known "feature" in MSIE7. Due to some change in the cashing system, it now replaces the spaces with underscores. I solved this by adding an str_replace (quick and dirty, i know) right before the header is send out to the browser, thus:
<pre>
// Fix MSIE 7 problem with replacing space to underscore
// by replacing the spaces with %20
$realname = str_replace(" ", "%20", $realname);

// send headers to browser to initiate file download
header ('Content-Type: application/octet-stream');
header ('Content-Disposition: attachment; filename='.$realname);
etc....
</pre>
I made the changes in view_file.php, check-out.php and view.php - a bit tricky, this - and _ usage ;-)
This should be solved using a proper encoding i guess, but a simple urlencode() didn't work. I'll leave that for someone to fix in the next release.
-- THIS DOESN"T WORK IN FIREFOX!! -- (FF didn't mess-up in the first place) a proper solution is still needed!!

Michaël