I have been testing this one since yesterday and I have found some odd behaviour that I can't explain. When a presenter uploads a document (tested with .xls and .doc) the files upload without any problem. But, when the reviewers attempt to download the document, they are unable to as the word "conference" is inserted into the file path.
Here is a list of the users and the paths related to the same uploaded file:
1. chair (manages conference and assigns reviewers) - file path: "http://www.example.com/sites/default/files/testpresentation3.doc"
2. presenter (creates papers) - file path: "http://www.example.com/sites/default/files/testpresentation3.doc"
3. reviewer (reviews papers) - file path: "http://www.example.com/conference/sites/default/files/testpresentation3.doc"
Note the addition of the word "conference" within the file path. If reviewers attempt to download the file, they are treated to a page not found error. I have created more than one reviewer in order to test this and am able to confirm that this path is only available to the reviewer users.
Comments
Comment #1
mfh commentedmight be the line (referring to the (certainly soon obsolete) version avail at: http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/conference/...)
did I do something wrong ? or simlpy take over what had been in the 4.7 version ?
might also depend on
- the upload configuration (private vs public)
- nice urls
- ...
if the links in the e-mails do work ; since they are made through
one should give it a try to replace the $file->filepath by ". file_create_url( $file->filepath ). "
(including the extremal quotes)
IIRC, the links worked for me, but I sometimes have a nonstandard "soft nice url's" system (on servers where true nice URLs (apache mod_rewrite) are not available, I implemented a "site/?pagename" scheme...)
at present I can't test it - would you dare to try this ?
(just search for file->filepath [there's only 1 occurrence] and replace by the above, or if you prefer,
insert just before that line (labelled 1479 above) the follownig line
and then replace file->filepath by url
if you report success, I'll fix it on the CVS
regards,
MFH
Comment #2
shane birley commentedThat is a good point. The links appear to work in the e-mails that are sent out. I will do the replacement right away and see if it corrects the problem.
Comment #3
shane birley commentedThe file setup on this demo site I am testing this all on is set to public files.
Comment #4
shane birley commentedI think I may have misunderstood what you wanted replaced. I replaced the following lines:
The links in the e-mails are correct, but, I have done it incorrectly because the paths are currently coming out like this:
The site has friendly URLs turned on and nothing else. Aside from core modules, the only other module running is the conference module.
Comment #5
mfh commentedI said: including the extremal quotes
but if you add the $url=... line, no need to reduplicate the function call, just replace file->filepath (w/ or w/o leading $) by url (w/ or w/o leading $)
i.e.
or
(note all of the single and double quotes)
sorry for having been a bit too concise...
Comment #6
shane birley commentedI thought I had misunderstood your request. Sorry about that. I have now replaced the code with:
This appears to have corrected the issue! I have tested a few times and it looks like things are working fine now both on the site and in the e-mail that is sent out. Well done!
Comment #7
mfh commentedI added the file_create_url() call in conference_reviews(),
checked on my laptop that this seemed to fix the issue, but doing the same change on the local file
hope I did not make a typo in the "main file"...
committed change - see latest version at http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/conference/...
Comment #8
shane birley commentedIt looks great! Thank you!
Comment #9
(not verified) commented