After the creation and deployment of a new module through Module Builder the dashlet file generated for the module produces php parse error.
In fact, for a module I created, deployed and working correctly, as modules/mkt_Checkin - my college tried to add the dashlet to a Home tab. Result: no dashlets load - the call to: index.php?action=index&module=Home produces an error 500 and on the server side, in the logs I get:
PHP Parse error: syntax error, unexpected '<', expecting identifier (T_STRING) in modules/mkt_Checkin/Dashlets/mkt_CheckinDashlet/mkt_CheckinDashlet.php
in fact the code reads:
<?php
if (!defined('sugarEntry') || !sugarEntry) {
die('Not A Valid Entry Point');
}
require_once('include/Dashlets/DashletGeneric.php');
require_once('modules/mkt_Checkin/mkt_Checkin.php');
class <module_name > Dashlet extends DashletGeneric {
function __construct($id, $def = null)
{
global $current_user, $app_strings;
require('modules/mkt_Checkin/metadata/dashletviewdefs.php');
parent::__construct($id, $def);
if (empty($def['title'])) {
$this->title = translate('LBL_HOMEPAGE_TITLE', 'mkt_Checkin');
}
$this->searchFields = $dashletData['mkt_CheckinDashlet']['searchFields'];
$this->columns = $dashletData['mkt_CheckinDashlet']['columns'];
$this->seedBean = new mkt_Checkin();
}
}
where you can clearly see that the class name was not correctly substituted from what guess is a template file for dashlets.
SuiteCRM: Version 7.8.3 - Sugar Version 6.5.24 (Versione 509)
Fix proposal is not yet ok, correct is in #3870
line 48 shoud be
class
no spece between
Hope this is correct way and place to comment... my first time.
@jannepesonen,
commit @Dillon-Brown resolved space problem: https://github.com/Dillon-Brown/SuiteCRM/commit/050e06c73b0dbc9e71e00f0827f74bf2cdf9c008 :)
Most helpful comment
Fix proposal is not yet ok, correct is in #3870Dashlet extends DashletGeneric {Dashlet
line 48 shoud be
class
no spece between
Hope this is correct way and place to comment... my first time.