English (United Kingdom)
Jms Multi Site, formerly joomla multisite.
Create, share multiple joomla sites in few clicks !
Message
  • EU e-Privacy Directive

    This website uses cookies to manage authentication, navigation, and other functions. By using our website, you agree that we can place these types of cookies on your device.

    View e-Privacy Directive Documents

Welcome, Guest
Please Login or Register.    Lost Password?

Ajax Uploader and problems with paths
(1 viewing) (1) Guest
Go to bottomPage: 1
TOPIC: Ajax Uploader and problems with paths
#11809
Ajax Uploader and problems with paths 10 Years, 10 Months ago Karma: 0
Hi there.

Some time ago i bought an uploader for photos and files to use in the Virtuemart cart.

This uploader doesn't work with jms mutisite (also in the master site).

I tried to uninstall jms multisite and the uploader work perfectly.

So... i contacted the developer of the uploader to ask him a suggestion...

He told me that his uploader can't run with the multisite component, because it use an "ajax loading" and it can't get paths from "define.php" file (used from jms multisites to get paths).

I know you can't get support for external components... but i really would like to have any suggestion about this.

Any Idea??

Thank you very much.
MaxDM
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#11811
Re: Ajax Uploader and problems with paths 10 Years, 10 Months ago Karma: 54
If you have problem with some Ajax application, this is generally due to the fact that the server side application does not perform a correct joomla initialisation.

When working under Joomla 2.5 or higher, the joomla initialisation is changed and most developer continue initilizing the ajax server site code with the joomla 1.5 method.

The author of the extension just have to use the standard joomla 2.5 initialization and the problem will be fixed.

The standard initialization can be found in any index.php present in the root of joomla that you can cross-check yourself.

The correct initialization is

define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);

if (file_exists(dirname(__FILE__) . '/defines.php')) {
include_once dirname(__FILE__) . '/defines.php';
}

if (!defined('_JDEFINES')) {
define('JPATH_BASE', dirname(__FILE__));
require_once JPATH_BASE.'/includes/defines.php';
}

require_once JPATH_BASE.'/includes/framework.php';


Most developper does not do that as skip the preliminary test that make the extension not working.
In general the error is

define('_JEXEC', 1);
define('DS', DIRECTORY_SEPARATOR);

define('JPATH_BASE', dirname(__FILE__));
require_once JPATH_BASE.'/includes/defines.php';

require_once JPATH_BASE.'/includes/framework.php';


So ask the author of the extension to fix their extension and use the standard joomla 2.5 initialization.

The new way to initilize joomla is also compatible with the old joomla 1.5
So just ask the author to fix their code.
edwin2win
Moderator
Posts: 5370
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#11813
Re: Ajax Uploader and problems with paths 10 Years, 10 Months ago Karma: 0
ah ok...

Now it's clear.... i'll ask him to modify his code.

Thank you very much for your help.
MaxDM
Fresh Boarder
Posts: 8
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
get the latest posts directly to your desktop
2Win, Multisite(s) are trademarks of Edwin2Win.
Joomla