Hi when a user uploads a file it all works great but upon successful upload it jumps to the home screen.
is there a way to redirect them back to where they were? if not then a possible pop up message saying upload successful or something?
@trucks79. Thanks for posting. Easy File Uploader does not redirect to the homepage. It redirects to the url that it is located in. However, with some people’s Joomla SEO setup or page url setup, the link to the page is not registered as menu item, and Joomla automatically redirects the page to the Home page.
What I do in the code is that I programmatically get the url of the page that is loaded, and redirect to that page. If Joomla gives the code the home page link, then it will redirect it. This usually happens when the link of the page is not compatible with the SEO settings or the menu items. If the page is not part of the existing menu system. You should create a hidden menu, and add the page as a menu item in it. When you do that, it will redirect to the correct url instead of the home page.
There is an easy fix:
Go to ..\modules\mod_easyfileuploader\tmpl\default.php and edit line 55:
//$action = Uri::current();
$action = JUri::getInstance()->toString();
@dragonfighter. Thanks for posting. I just thought I would point out that
Uri::current(); is pretty much exactly the same as
JUri::getInstance()->toString();. It is essentially the following:
Uri::getInstance()->toString(array(‘scheme’,‘host’,‘port’,‘path’));
You can verify this by looking at the Uri.php file in the Joomla Platform code.