Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Cannot run reports
 
rmadridca
Jr. Member
 
Total Posts:  19
Joined:  2008-07-23
 

Hi,

For some reason I cannot run the majority of the reports. Example, when I try to run the Sales Report, I keep getting a javascript error that says “Invalid XML markup - <? if($this->getDateFilterVisibility()):?>

When I open javascript debugger this seems to be the code causing the issue -

<script type="text/javascript" language="javascript">
gridSalesJsObject = new varienGrid(’gridSales’, ‘http://dev.coopmagento.bsharp.com/index.php/admin/admin/report_sales/sales/’, ‘page’, ‘sort’, ‘dir’, ‘filter’);
gridSalesJsObject.useAjax = ‘’;
<? if($this->getDateFilterVisibility()):?>
gridSalesJsObject.doFilterCallback = validateFilterDate;
var period_date_from = $(’period_date_from’);
var period_date_to = $(’period_date_to’);
period_date_from.advaiceContainer = $(’period_date_from_advaice’);
period_date_to.advaiceContainer = $(’period_date_to_advaice’);

function validateFilterDate()
{
if (period_date_from && period_date_to) {
return Validation.validate(period_date_from) && Validation.validate(period_date_to);
}
else {
return true;
}
}
<? endif;?>
</script>

i haven’t made any changes to the reports, so I’m not sure why they don’t work. Does anyone have any suggestions?

 
Magento Community Magento Community
Magento Community
Magento Community
 
rmadridca
Jr. Member
 
Total Posts:  19
Joined:  2008-07-23
 

There is a typo in app\design\adminhtml\default\default\template\report\grid.phtml. Line # 185 which is

<? if($this->getDateFilterVisibility()):?> should be <?php if($this->getDateFilterVisibility()):?>

hence the reason for the javascript error.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top