CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Drupal View as a Tab
Pages: [1]

Author Topic: Drupal View as a Tab  (Read 401 times)

mikem

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.X
Drupal View as a Tab
October 13, 2014, 02:43:50 pm
In 4.4.3 i setup a custom tab that contained a custom drupal view that i created that would show up on each contact record. After upgrading to 4.5 the custom tabs are giving me an error message saying "Network Error: Unable to reach the server. Please refresh this page in your browser and try again." Is there any documentation on how the civi tabs have changed within the contact record "summary" "contributions", etc.??? See code below for example of current code.

Code: [Select]
function mywvbar_civicrm_civicrm_tabs(&$tabs, $contactID){   
    foreach($tabs as $key=>$value){
        if($value['id'] == 'activity'){
            $tabs[$key]['weight'] = 28;
        }
    }   
    $url = CRM_Utils_System::url('civicrm-tab/user/mcle-submissions/'.$contactID, "reset=1&snippet=1&force=1&cid=$contactID");
 
   
    $tabs[] = array(
        'id' => 'mcle',
        'url' => $url,
        'title' => 'MCLE',
        'weight' => 29,

 );
         
}
« Last Edit: October 13, 2014, 04:19:07 pm by mikem »

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Drupal View as a Tab
October 13, 2014, 04:23:17 pm
does the view itself look happy?
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

mikem

  • I post occasionally
  • **
  • Posts: 70
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: 7.X
Re: Drupal View as a Tab
October 13, 2014, 04:33:48 pm
When you click on the tab it does not display the view like it normally would. If you right click on the tab and open in a new browser the view loads fine but not in civi.

Michael McAndrew

  • Forum Godess / God
  • I live on this forum
  • *****
  • Posts: 1274
  • Karma: 55
    • Third Sector Design
  • CiviCRM version: various
  • CMS version: Nearly always Drupal
  • MySQL version: 5.5
  • PHP version: 5.3
Re: Drupal View as a Tab
October 15, 2014, 03:31:06 am
Not sure if this is related but sometimes I get that error for reports on the dashboard when the server doesn't know how to find the URL. e.g. my local computer might know that a URL resolves to a certain IP address but the server does not (which explains why it works when I open the tab in a new browser).  Though the more I think about that, the less sure I am that it is the reason since I think reports and tabs use a different mechanism to pull in the code.

"Network Error: Unable to reach the server" on 4.5 errors have also been reported by Graham incase that helps: http://forum.civicrm.org/index.php/topic,34402.msg146022.html#msg146022

Sorry I can't give a more definitive answer - hoping you might find some use in the above.
Service providers: Grow your business, build your reputation and support CiviCRM. Become a partner today

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Upgrading CiviCRM (Moderator: Deepak Srivastava) »
  • Drupal View as a Tab

This forum was archived on 2017-11-26.