[Vtigercrm-developers] Create entity specific widget

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Vtigercrm-developers] Create entity specific widget

sukhdev.mohan
Hi all,
I'm trying to create a widget for Accounts module. I need to show a graph of
some custom parameters I've added to the entity.

I've added this line in vtiger_links
tabid =>6, linklabel => LBL_GRAFICO_FIDO, linkurl =>
index.php?module=Accounts&view=Detail&mode=showGraficoFido, linktype =>
DETAILVIEWWIDGET

This is the code in
Accounts/model/DetailView.php: https://pastebin.com/Z3jDT5a0
Detail.php: https://pastebin.com/p9pqWF9t
SummaryViewWidgets.tplk: https://pastebin.com/tJftp5yx

Can't make it to work, it just breaks and I'm able only to see the menu bar
in Account's Dashboard.
Pleae help and appologies is this is a naive question but the documentation
i found online isn't leading towards the solution (can anybody poitn out
some good documentation too?).

Thanks in advance,
Sukhdev Mohan






--
Sent from: http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html
_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Create entity specific widget

sukhdev.mohan
Hi
can't beleive none can help this rookie... can someone help me? would really
appreciate some senior vtiger dev to help me out thanks.



--
Sent from: http://vtiger-crm.2324883.n4.nabble.com/vtigercrm-developers-f4.html
_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Create entity specific widget

Alan Lord (News)
On 09/09/2019 15:33, sukhdev.mohan wrote:
> Hi
> can't beleive none can help this rookie... can someone help me? would really
> appreciate some senior vtiger dev to help me out thanks.

When you write a comment like

> it just breaks and I'm able only to see the menu bar
> in Account's Dashboard.

This makes it very hard to offer any help.

This sounds a bit like what I call a "white screen of death" - generally
this just means the code has exited prematurely. But it's hard to help
without knowing why.

Please try asking your question in a different way and do some debugging
to see what errors are occurring: in the vtiger debug log, by php_error
reporting, and/or in the Javascript Console.


HTH


Al

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Create entity specific widget

sukhdev.mohan
This makes it very hard to offer any help.

I apologize for this but I had to draw attention.


This sounds a bit like what I call a "white screen of death" - generally
this just means the code has exited prematurely. But it's hard to help
without knowing why.

Please try asking your question in a different way and do some debugging
to see what errors are occurring: in the vtiger debug log, by php_error
reporting, and/or in the Javascript Console.

That's why I'm here, already tried enabling debug mode to see what is the error and it's saying that the cached object responsible for view is null, googled a bit and found nothing but "try cleaning the cache" and have tried cleaning both browser and vtiger's cache.

I'm sure i'm missing something but can't figue it out. I've tried to do how other modules do but no luck either. 

Is there any reference guide or some examples/tutorials to follow? 

Thanks

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Create entity specific widget

Alan Lord (News)
On 09/09/2019 17:13, Sukhdev Mohan wrote:
> cached object responsible for view is null

That sounds to me like your DetailView class is not even being loaded.

Probably a typo or something.

Just run it from the command line, e.g.

# php -f modules/Accounts/models/DetailView.php

You should ONLY get an error about not being able to load the parent
class Vtiger_DetailView_Model. If there are any typos you will get these
first.

That's where I'd start.

Here are some useful links:

https://support.redoo-networks.com/knowledgebase/vtigercrm-debugging/

https://community.vtiger.com/help/vtigercrm/developers/index.html

https://community.vtiger.com/help/vtigercrm/developers/extensions/examples.html

_______________________________________________
http://www.vtiger.com/
Reply | Threaded
Open this post in threaded view
|

Re: Create entity specific widget

sukhdev.mohan
$  php -f modules/Accounts/models/DetailView.php
PHP Fatal error:  Class 'Vtiger_DetailView_Model' not found in /var/www/aluvetro.it/hosts/crm/modules/Accounts/models/DetailView.php on line 11

As expected it’s not finding the father class :/

This is the result: not only the widget I’m adding is not showing up but the default one too are gone… console log doesn’t show anything 


I’ll head to the references you pointed in the previous email
Best Regards,
Sukhdev Mohan
———————————
Cel. (+39) 320 7020345
[hidden email]




Il giorno 9 set 2019, alle ore 19:03, Alan Lord <[hidden email]> ha scritto:

 php -f modules/Accounts/models/DetailView.php


_______________________________________________
http://www.vtiger.com/