News:

Looking for documentation? Take a look on our wiki

Main Menu

Inconsistence in Virtuemart controllers

Started by MaartenMJR, March 09, 2013, 10:47:04 AM

Previous topic - Next topic

MaartenMJR

I recently found a inconsistency in the way Virtuemart controllers deals with redirects. Some controllers use the JController::setRedirect() method while others use the JApplication::redirect() method.

In my application, I reuse the Virtuemart cart Add controller method for a derivative cart component, where I ran into problems because of the hard redirect that is implemented there. Investigation on the Virtuemart controllers shows that the redirect() method is used 18 times, while the setRedirect() method is used 16 times.

From my point of view, it would be reasonable to only use the setRedirect() function and let Joomla decide whether or not a particular redirect needs to be executed, or that a higher priority redirect must be used. Does anyone know whether there is a good reason to use different redirect methods? If not, is it possible to get the setRedirect() method implemented upstream?

Milbo

thanks, good that you say that. This is one of the goals for vm2.1 To reduce redirects and to use the optimal method.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

MaartenMJR

Hi Milbo,

Glad you agree with me. If it is possible and appreciable I could implement this mainstream.

For that, I think I'd have to be a Virtuemart developer. Is something like that possible? Or is it better to just post my comments on this forum?