UddeIM attchments cannot be accessed: error message: File not found.

6 years 3 months ago #300679 by kletterdorf
We are on Joomla 3.7.5, using NGINX/1.12.1 webserver
We are using UddeIM 4.0 (premium)

Our webserver and joomla are configured to use SEO / url rewrite
The directory /var/www/website/images/uddeimfiles is set to 2775.

When SEO/URL Rewrite is turned on, alle UddeIM functions are available via the Frontend, incl uploading/sending attachments.
However, neither the recipient nor the sender can access the file using the UddeIm provided links.

www.urlremoved.de/component/uddeim/index.php?option=com_uddeim&task=downloadOutbox&Itemid=0&messageid=377301&fileid=2009&no_html=1

We found ot that either "/component/uddeim" or "/index.php" need to be dropped to make this url work, i.e.

www.urlremoved.de/index.php?option=com_uddeim&task=downloadOutbox&Itemid=0&messageid=377301&fileid=2009&no_html=1
www.urlremoved.de/component/uddeim/?option=com_uddeim&task=downloadOutbox&Itemid=0&messageid=377301&fileid=2009&no_html=1

What can be done to make SEO/URL Rewrite work with UddeIM? All other components work with SEO/Url Rewrite.
When SEO only is turned on and Url Rewrite are turned off (in Joomla backend system configuration) then the attachments can be accessed.

Please Log in to join the conversation.

6 years 3 months ago #300682 by slabbi
Unfortunately Joomla is sometimes a little bit stubborn when SEF/URL rewrite is used.
A correct rewritten URL does not include "index.php" (or other way round; when you see "index.php" in the URL the SEF/URL rewriting is not configured correctly).

So please ensure that your rewrite code drops "index.php" and the download should work properly.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer
The following user(s) said Thank You: kletterdorf

Please Log in to join the conversation.

6 years 3 months ago #300697 by kletterdorf
thank you, Slabbi, for your quick response, that I forwarded to my friend who is looking after the server.
he obviously analyzed your feedback and suggests to incorporate the following into com_uddeim/attachement.php.
from his perspective there is a bug in the original code, it is maybe possible to review the suggested change and consider it for future releases? That would help us a lot.

the php-code does not convert links using the absolute path when calling uddeIMsefRelToAbs(...)

here is the code as it should be (at least from our point of view). in our environment this change successfully healed the error

if (!$config->unprotectdownloads) {
if (class_exists('JHTML'))
$link = "<a
href='".uddeIMsefRelToAbs("index.php?option=com_uddeim&task=".$temp."&Itemid=".$item_id."&messageid=".$row->mid."&fileid=".$row->id."&no_html=1")."'>";
else
$link = "<a
href='".uddeIMsefRelToAbs("index2.php?option=com_uddeim&task=".$temp."&Itemid=".$item_id."&messageid=".$row->mid."&fileid=".$row->id."&no_html=1")."'>";
} else {
$link = "<a href='".$pathtosite."/images/uddeimfiles/".$row->tempname."'>";
}

Please Log in to join the conversation.

6 years 3 months ago #300699 by slabbi
Thanks for this solution. Using absolute paths will fix the problem.
Nevertheless SEF should also work with relative paths, so maybe it might be a good idea to check the URL rewriting code in order to ensure that the problem will not occur again with other components.

uddeIM & uddePF Development
CB Language Workgroup
CB 3rd Party Developer

Please Log in to join the conversation.

Moderators: beatnantslabbikrileon
Time to create page: 0.165 seconds

Facebook Twitter LinkedIn