salesagility / SuiteCRM

SuiteCRM - Open source CRM for the world
https://www.suitecrm.com
GNU Affero General Public License v3.0
4.42k stars 2.07k forks source link

Detailviewdefs: fields containing customCode are not rendered on Detail View (v 7.10.7) #6259

Closed vladimirpekez closed 5 years ago

vladimirpekez commented 6 years ago

Issue

Fields containing customCode in Detailviewdefs metatada are not rendered on Detail View (v 7.10.7).

Expected Behavior

All Fileds containing customization in customCode attribute should be rendered.

Actual Behavior

Fields containing customCode in Detailviewdefs metatada are not rendered on Detail View (v 7.10.7). Not only that customizations are not shown but the whole field is missing from detail view. Only empty detail-view-row-item is outputted.

Possible Fix

I have performed debug and verified that customCode viewdefs does reach Suite P template intact.

Root cause of issue seems to be in Tab panel content template which is included in Suite P Detail View template (themes/SuiteP/include/DetailView/tab_panel_content.tpl).

I will now see how can I change the core template to allow for customCode processing.

Steps to Reproduce

  1. Introduce simple customCode customization to /custom/modules/Accounts/metadata. Copy detailviewdefs.php from modules/Accounts/metadata and add following customCode to name field:

    array ( 'lbl_account_information' => array ( 0 => array ( 0 => array ( 'customCode' => '{$fields.name.value}', 'comment' => 'Name of the Company', 'label' => 'LBL_NAME', ),

  2. Perform Repair & Rebuild

  3. On Accounts module Detail View instead of having Account name in red color you don't see the Name field at all.

Context

Instances containing customCode can not be upgraded to v7.10.7 because fields containing customCode will not be shown at all!

Your Environment

SuiteCRM Version used: 7.10.7. Browser name and version Latest Chrome Version 64-bit Environment name and version PHP 7.1 Operating System and version: CentOS 7.5

Screenshot

Dillon-Brown commented 5 years ago

I'm unable to replicate this issue on hotfix or latest LTS. Please let me know if this is still an issue you can replicate and we will investigate further. Thanks.