Drupal Document module

rahul's picture

Document is a complete Document Management System for the Drupal CMS. I am still working on some parts of the module and hopefully, its first release should be available soon.

The official page for the module on drupal.org is this:
http://drupal.org/project/document

The current page is the permanent address for the module on my website, where I would provide updates on the module development status, and links to some other resources I have created for using the module. You can also use this for discussing with me any issues you face while using the module. However, please file all bug reports and feature requests at the official module issue queue.

I will try to add a Demo for the module at my Sandbox site for Drupal as soon as possible.

UPDATE:

  • Jun 18, 2011 - Drupal 7 version of the module is now available. Please help me in testing it and iron out any issues to create a stable release for the D7 branch.
Projects: 
PHP: 

Comments

Hi Rahul:

Sorry if this is not the rigth place to ask. Feel free to remove the comment if not.

I'm installling your promising Documents module for Drupal 6 and after enabling and saving the module I get an error:

"Parse error: parse error, unexpected '{' in PATHTOMYROOTDRUPAL\modules\document\document.module on line 289"

I've been reading the php code in this line but I can't find anything wrong. Any clue?

Thanks in advance!

By Enrique Sanchez (not verified)
rahul's picture

Hi Enrique, a possible reason might be PHP version. I think I should mention this on the Project Page that this module requires PHP 5.

By rahul

what about this error on drupal7?

Warning: Parameter 1 to document_settings_form() expected to be a reference, value given in drupal_retrieve_form() (line 787 of /var/www/drupal/includes/form.inc).

this error showed up I click on Configure!

By felix (not verified)
rahul's picture

Hi felix, this module's D7 port has some issues that I am trying to take out time to fix. At the official issue queue of the module on d.o. (here), other users have reported similar issues and provided fixes/patches too. Can you please try using one of them.

By rahul

Hi Rahul:

I was wondering if you can give me a hand. i installed your module onto my drupal site, everything looks good exept when i try to add a document type. after i type in the document type onto the text box and press the button to add it it give me an error. the error only reads "error"

Thank you in advance

Oscar

By oscar (not verified)
rahul's picture

Hi Oscar, its pretty hard to tell from that description, what's going wrong and where?

Can you please try to produce the Request & Response when you click "Add Document Type" button? You can capture these either through Fiddler or through Firebug.

By rahul

Thanks for the quick response, not sure if this is what you mean.

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL /usr/share/drupal6/index.php was not found on this server.</p>
<hr>
<address>Apache/2.2.14 (Ubuntu) Server at  Port 80</address>
</body></html>
By oscar (not verified)
rahul's picture

Hmm... not sure, maybe related to clean urls not being enabled!! Cannot be sure without seeing the actual environment...

By rahul

That did it, thank you so much

Oscar

By oscar (not verified)

Hi,

after installing the document module on my stage enviroment, I tried to define document types, but always received an error message when entering something in the field:

Add Document Type:

What needs to be entered their? (f.e doc or .doc) did'nt work

thanks,
ullrich

rahul's picture

Hi Ullrich, Document Type is basically a regular Drupal Taxonomy vocabulary which the module uses to organize documents. You can enter any classification for the document, e.g. Report, Guideline etc. However, I don't see a reason why doc etc. should also fail. Please ensure that clean urls are enabled on the server.

By rahul

Hello, I wanted to ask how to fix document table sort error. If i first search document and again sort table

then i jump in new window (file - screenshot)?

Thanks for the help

By diskr (not verified)
rahul's picture

Hi diskr, I was not clear on what you meant by "then I jump in new window". I checked the screenshot, but was not able to understand. Can you please elaborate?

By rahul

Thanks for the help, rahul. I'll try to explain more widely. Go to documents search page (http://localhost/drupal/document). Here is serch documents fieldset and result table with sortable header. when I first want to sort, everything be well. I am getting this sorted table document. But if i first searching document and then sort table, then displayed table in a new white window. I make new beter screenshot. Please see

 

By diskr (not verified)
rahul's picture

Hi diskr, thanks for pointing this out. I have been able to reproduce this. This seems to be a bug in the code. I will try to resolve this soon and create a new release on the official Drupal project page.

By rahul

Thank you very much,
I waited new release

By diskr (not verified)
rahul's picture

Hi diskr, the issue has been fixed. You should have available for download, a Beta2 version of the module soon on the official project page.

By rahul

Hey, would love to see a demo of the document module in sandbox. Have a client that would like to see a demo. Any idea of when you might have one available?

rahul's picture

Hi David, I currently do not plan to make available demo for the Document module in my sandbox site. Why don't you install the module on a test Drupal installation yourself? It should not take more than 10 minutes to download and install Drupal together with the Document module for a demonstration.

By rahul

Hi Rahul

I have installed the document module, created a folder to store the documents in, configured the module all with no problems.

My initial problem is that I placed a document (pdf file) in the relevant folder, but when I tried to access it via the documents gui the searches returned nothing.

file name: quote_template.pdf

I searched using keyword 'quote' and filetype 'pdf', to no avail.

Also, if, as I assume from a previous post that 'filetype' is not the extension, ie .pdf, but a catagory into which any filetype (based on extension) could be placed, how are the files meant to be uploaded? If my assumption is correct a category (type) would need to be allocated to it at time of upload.

I apologise if I am being obtuse but I am a bit confused at to the intended usage of this. I was looking for something that would manage a repository of documents, making them available for download, via a simple interface, to those authorised to do so.

I would be very grateful if you could enlighten me on this.

many thanks for your work on this module

Jon

By Jon (not verified)
rahul's picture

Hi Jon, you missed an important part. After installing and enabling the module, you should create and upload the document via the module itself. A document is a node, and you can create one from (http://example.com/node/add/document).

On the interface for document creation, you can upload the file that would be stored to the folder specified in the administration configuration. And the document should then be available for search and download via the interface.

From what I read of your requirements, the module should fit your needs perfectly. You can configure the permissions for the module to control who is authorized to create, search and access documents using the Drupal's normal permissions UI. Look for additional permissions under the document module.

By rahul

Ah, exactly so. Many thanks Rahul. I was indeed being dense. Working fine now. Many thanks for your prompt response and indeed your work creating this module. I think that it will be perfect for my requirements.

Once again, many thanks for your help

Jon

By Jon (not verified)

Sorry to be a pain Rahul but I have another issue. When I set the module up it asked for a file path to store to store the documents on. I gave it '.../sites/default/files/docs'

I can upload a document, but it doesn't seem to save it there. I can search for it and find it successfully, but not download it. The download link points to '.../sites/default/files//tmp/' which returns a 'page not found' error.

Also, I would like to place a menu link in the navigtion block (or somewhere) labeled 'upload file) which links to the front-end of the module for users of to upload files. Is this possible. Please bear in mind that I am a total newbie at this, hence the dumb questions.

rgds

Jon

By Jon (not verified)
rahul's picture

Hi Jon, I do not see any reason for the upload path not working. However, a couple of observations regarding your particular input:

  • The path needs to be just "docs". It's always interpreted relative to the Drupal file-system directory. Thus, docs would actually map to "sites/default/files/docs" (assuming default Drupal file-system directory).
  • You have used "../" in your path. This could be the problem. This makes the document upload path outside the Drupal's file-system folder, to which Drupal (meaning your web-server) does not have write-permissions to on most set-ups. Thus, uploading (or trying to create that directory) might be failing with permission problems. So, try limiting the path to just "docs".

Regarding menu, any role with the "create document" permission would be able to upload documents to your portal. Users having this permission should by default see a link for "Document" under "Create Content" in navigation menu. You can add an explicit menu-item for the path "node/add/document" to any menu in your setup.

By rahul

Thank you Rahul. I can upload, search and download now. I did find that I needed to right click on the download link and 'save target as' to download the file correctly. If I just hit the download button it tried to open the file (a pdf) in the browser and returned an error.

All good so far though. I will do the links and permissions thing on Monday.

Many thanks once again

Jon

By Jon (not verified)

Hi Rahul

A couple of questions:

Permissions

'Anonymous users cannot post even if they have the permission' Is this because anonymous users would not have an email address for the feedback email? Ideally I would like anonymous users to be able to upload documents.

I'm not getting the feedback email at all. I assumed that if I set the Document content type workflow settings to 'published', the document would automatically be published and an email would be sent to the sender. This is not happening. Neither does it happen if I publish the document manually.

I'm sure that it is something I haven't done, but any help would be appreciated. Also is it possible to change the title from 'Create Document' to 'Upload document'

Is it also possible to remove the 'Year of Publication' field from the download page, as it's a bit too vague for my purpose?

many thanks

Jon

By Jon (not verified)
rahul's picture

Hi Jon, its been sometime since I last wrote code for this module in a major way. I need to look at the code but yes, mails was probably the reason I chose not to allow anonymous users to create documents. I agree it would be more useful to allow them, and I would look forward to changing this is a future release.

I have a couple of sites where this module is deployed and I am getting emails regularly. An email is only sent when the document is published manually, but nevertheless, you should be receiving such mails. Please verify the admin settings for the module at 'admin/settings/document' and ensure 'Email the Creator of the Document when it is published by administrators' option is checked.

Regarding other customizations, like title changes, you would need to make them manually in code currently, but I would provide admin options for them in future. Lastly, you cannot remove 'Year of Publication' field. Instead what I would suggest is to set that field to a value using jquery at the document creation page ('/node/add/document') and set its <div> visibility to hidden again in jquery. This would ensure that a correct value for the field gets submitted, but user does not see this field.

By rahul

Hi Rahul

Many thanks for your reply, however:

<set that field to a value using jquery at the document creation page ('/node/add/document') and set its <div> visibility to hidden again in jquery>

is waaaaaay outside my humble skillset. In actuality I do not know how to do that. I have the jquery module but that's all I know.

I'm sure that you're very busy but if you have the opportunity to post a code snippet............:)

many thanks again for your response

By Jon (not verified)

Hi,

I really like your module, but is it posible to disable the document search? I'm using the drupal search with search_files and I don't want my users to be confused about the different search options

kind regards,
Natascha

rahul's picture

Hi Natascha, you should not reply to an existing comment but start new ones for unrelated comments. Anyways, you can disable the menu option for the document search from admin/build/menu and then configure the permissions for the document search in admin/user/permissions. This would ensure that your users do not see document search page and are unable to directly access it by typing the url also.

By rahul

Hi Rahul,

What lines do I need to comment out to remove the document revisioning?

Many thanks

Chris Wray

rahul's picture

Hi Chris, revisioning is tightly integrated into the module. You cannot remove it easily without making major changes. I have not really tried it, but try commenting the following set of lines in document.module for the latest version to see if it helps:

Lines 245 - 248
Lines 263 - 265
Line  280

That might help you change attached documents without forcing you to create a revision.

By rahul

Experimenting with your module -- great so far!  A couple questions:

1)  Is it possible to organize documents by CATEGORY?  So for example, when uploading a doc you specify that it belongs to the "Account Department" or "Human Resources".  Then on the search page you'd see a drop down menu which would allow users to only display (or search) documents within a specific category.

2) Is there a max number of docs you'd recommend NOT exceeding?

Thanks for your help.

By Michael (not verified)
rahul's picture

Hi Michael, to answer your 1st question, the documents are organized by category, but the module's search page always displays all available categories for searching.

However, accomplishing what you need should not be too difficult. The module supports Views and you can easily create a custom search form using CCK and display the results using Views.

For the second question, the module does not impose any max number. In fact, module integrates tightly with Drupal core, and the documents uploaded are managed by Drupal's file-system functions. So, you can upload any number of documents as permissible by your disk space limits.

By rahul

Good morning.  The specs for this system have evolved a bit over time. How about organizing docs by category AND subcategory?  Is there any way to work a subcategory search into the process?

Thanks again.

By Michael (not verified)
rahul's picture

Hi Michael, You can try achieving what you want through CCK/Taxonomy. I have been thinking over how to incorporate extensibility into the module, and maybe for the next release, I will add support for CCK fields into Document. But this really depends upon how much time can I devote to this module outside my commercial commitments.

By rahul

Hi Rahul. One questions: whath do you think about the use of db (mysql) to store docments? For a large number of documents to manage I think to obtain some benefits with this stategy. Do you think to do that should be very difficult? I'd like to work at this project.

Thanks for your advice.

Simone Marcucci

By simone (not verified)
rahul's picture

Hi Simone, I do not think its a good idea to store documents (unless you have some optimized DBMS specifically for storing documents).

It would bloat the database too much as the number and size of documents grow, and would put too much load on the database server if large documents are downloaded frequently.

What benefit do you see coming from by storing documents in db?

Please let me know how you would like to contribute to this project? Any help would be welcome!!

By rahul

Add new comment