CoreBOSBB
Can't add related module block to the main layout - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Support (https://discussions.corebos.org/forumdisplay.php?fid=17)
+--- Forum: Administrator Support (https://discussions.corebos.org/forumdisplay.php?fid=8)
+--- Thread: Can't add related module block to the main layout (/showthread.php?tid=1768)

Pages: 1 2


Can't add related module block to the main layout - addady2 - 04-24-2020

Hi,

I Can't add related module block (activities/todo) to the main layout of Organization.
It not available in the menu (attach some screen shots).

The module is active and function in the "More information" tab.

How to fix it?

P.S: One of the pic is too width. you need to decrease the font size (zoom out, Ctrl - - ) to see the full pic


RE: Can't add related module block to the main layout - joebordes - 04-24-2020

look for that relation in the database: vtiger_relatedlists tables, I suppose it won't be a standard related list maybe
I just tried in my development install and it worked. Can you try in the online demo?


RE: Can't add related module block to the main layout - addady2 - 04-24-2020

(04-24-2020, 09:09 AM)joebordes Wrote: look for that relation in the database: vtiger_relatedlists tables, I suppose it won't be a standard related list maybe
I just tried in my development install and it worked. Can you try in the online demo?

I did't understand you.
In the online demo it working fine. I my installation there is no GUI option as mention in my 1st post.
Should I fix some thing in the database?


RE: Can't add related module block to the main layout - joebordes - 04-24-2020

the relations are saved in the vtiger_relatedlists table in the DB

this query will list them all


SELECT * FROM `vtiger_relatedlists` WHERE `tabid` = 6

the attached image is what that query looks like in my development install

[attachment=1018]

compare that to your install, especially the "get_activities" line which is the one that is failing on you.

let us know


RE: Can't add related module block to the main layout - addady2 - 04-26-2020

I do have get_activities, and it look the same. attach screen shot.

As I wrote in my 1st post
Quote:The module is active and function in the "More information" tab.

the problem is that I can't move it from "More information" tab  to the main tab.


RE: Can't add related module block to the main layout - joebordes - 04-26-2020

this query will show you the list of related modules for Accounts

Code:
select *
from vtiger_relatedlists
left join vtiger_tab on vtiger_relatedlists.related_tabid = vtiger_tab.tabid and vtiger_tab.presence = 0
where vtiger_relatedlists.tabid = 6 order by sequence

this query will show you the existing related blocks that you have in the accounts module

Code:
SELECT vtiger_tab.name
FROM vtiger_blocks
INNER JOIN vtiger_relatedlists ON vtiger_blocks.isrelatedlist=vtiger_relatedlists.relation_id
INNER JOIN vtiger_tab ON vtiger_relatedlists.related_tabid = vtiger_tab.tabid
WHERE vtiger_relatedlists.tabid = 6


the difference between the two is what is being shown in the layout editor "Add Block" picklist 

share the results with us


RE: Can't add related module block to the main layout - addady2 - 04-27-2020

Attact the output as text file

There is a big diff


RE: Can't add related module block to the main layout - joebordes - 04-27-2020

that looks correct to me. I see nor reason why it wouldn't work.
try adding this change to the code


Code:
diff --git a/modules/Settings/LayoutBlockList.php b/modules/Settings/LayoutBlockList.php

index 67b1a6ef9..feeb67502 100644
--- a/modules/Settings/LayoutBlockList.php
+++ b/modules/Settings/LayoutBlockList.php
@@ -139,7 +139,7 @@ while ($rl = $adb->fetch_array($brmrs)) {
 }
 $notBlockRelatedModules = array_diff_key($relmods, $blockrelmods);
 $smarty->assign('NotBlockRelatedModules', $notBlockRelatedModules);
-
+var_dump($notBlockRelatedModules, $blockrelmods);
 $curmodsinrel_result = $adb->pquery('SELECT fieldid,relmodule FROM vtiger_fieldmodulerel WHERE module=?', array($fld_module));
 $curmodsinrel = array();
 while ($row = $adb->fetch_array($curmodsinrel_result)) {



that will output the raw lists on the screen. share that with me.


RE: Can't add related module block to the main layout - addady2 - 04-27-2020

Its:

array(18) { ["cbtranslation"]=> string(10) "Activities" ["Potentials"]=> string(13) "Opportunities" ["Quotes"]=> string(6) "Quotes" ["SalesOrder"]=> string(11) "Sales Order" ["Invoice"]=> string(7) "Invoice" ["Emails"]=> string(5) "Email" ["Documents"]=> string(9) "Documents" ["HelpDesk"]=> string(15) "Support Tickets" ["Products"]=> string(8) "Products" ["ServiceContracts"]=> string(17) "Service Contracts" ["Services"]=> string(8) "Services" [116]=> string(8) "Payments" [128]=> string(6) "Assets" [137]=> string(8) "Projects" ["InventoryDetails"]=> string(17) "Inventory Details" ["cbSurveyDone"]=> string(12) "Surveys Done" ["cbSurveyAnswer"]=> string(14) "Surveys Answer" ["cbCompany"]=> string(9) "Companies" } array(2) { ["Contacts"]=> int(1) ["Campaigns"]=> int(1) }

attach screen shot


RE: Can't add related module block to the main layout - joebordes - 04-27-2020

the problem is here: ["cbtranslation"]=> string(10) "Activities"
somehow your install is mapping the cbtranslation module to activities

maybe some custom translation somewhere?