VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Jumbo! on November 19, 2015, 20:07:39 PM

Title: Front-end Vendor's "Access Administration Interface" Vs Template HTML Overrides
Post by: Jumbo! on November 19, 2015, 20:07:39 PM
There is a bug accessing Vendor's Administration Interface in front-end if the template overrides Front Page HTML Layout (view: virtuemart).

How to reproduce it:


Reason:

This is happening because Vendor's Administration Interface and Front Page share the same view class i.e. VirtuemartViewVirtuemart When you try to access Vendor's Administration Interface in front end and when the Joomla template has Front Page HTML Layout override, it sets layout file as templates/protostar/html/com_virtuemart/virtuemart/default.php instead of administrator/components/com_virtuemart/views/virtuemart/tmpl/default.php

Ideally they should have two separate names for the views.


Temporary Solution:

Open the Front Page HTML layout override file of your template. For the above TEST case it is templates/protostar/html/com_virtuemart/virtuemart/default.php

Find the following codes around line 20:

defined('_JEXEC') or die('Restricted access');

Replace above by:

defined('_JEXEC') or die('Restricted access');

if(JFactory::getApplication()->input->getInt('manage', 0))
{
include(JPATH_ADMINISTRATOR . '/components/com_virtuemart/views/virtuemart/tmpl/default.php');
return;
}



Looking forward to a proper fix.