Results 1 to 6 of 6

Thread: MySugar.php line 94 error - Add Dashlet

  1. #1
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default MySugar.php line 94 error - Add Dashlet

    When adding a new dashlet to the home page (does not matter which one) several users get this error message at the top of the home page:
    Fatal error: MySugar::require_once() [function.require]: Failed opening required '' (include_path='C:\xampp\xampp\htdocs\sugar_test\in clude/..;.;C:\xampp\xampp\php\pear\') in C:\xampp\xampp\htdocs\sugar_test\include\MySugar\M ySugar.php on line 94

    When I do a dump of require_once($dashlets[$id]['fileLocation']); I get this:

    <br /><b>Warning</b>: array_unshift() [<a href='function.array-unshift'>function.array-unshift</a>]: The first argument should be an array in <b>C:\xampp\xampp\htdocs\sugar_test\include\ MySugar\MySugar.php</b> on line <b>76</b><br />

    Which means something is funked up with this array:
    $pages[$_REQUEST['activeTab']]['columns'][0]['dashlets']

    Any ideas?

    Thanks,
    Jason

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: MySugar.php line 94 error - Add Dashlet

    I can get around this error by doing this:
    PHP Code:
    if(!is_array($pages[$_REQUEST['activeTab']]['columns'][0]['dashlets'])) $pages[$_REQUEST['activeTab']]['columns'][0]['dashlets'] = array(); 
    I'd like to find the source of it though because other related issues are still popping up.

  3. #3
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default Re: MySugar.php line 94 error - Add Dashlet

    where do i put this php error? i'm getting the same!

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: MySugar.php line 94 error - Add Dashlet

    In the file mentioned in the first post:
    C:\xampp\xampp\htdocs\sugar_test\include\MySugar\M ySugar.php

  5. #5
    kinshibuya's Avatar
    kinshibuya is offline A Sugar Hero
    Join Date
    Jul 2008
    Location
    brasil
    Posts
    521

    Default Re: MySugar.php line 94 error - Add Dashlet

    thanks
    I did this

    if(!is_array($pages[$_REQUEST['activeTab']]['columns'][0]['dashlets'])) $pages[$_REQUEST['activeTab']]['columns'][0]['dashlets'] = array();
    $current_user->setPreference('dashlets', $dashlets, 0, $this->type);

    echo $guid;
    }
    else {
    echo 'ofdaops';
    }
    }

    and still got nothing... but thanks for the reply

  6. #6
    genius36 is offline Sugar Community Member
    Join Date
    Jul 2006
    Posts
    27

    Default Re: MySugar.php line 94 error - Add Dashlet

    I tried adding the code above in
    Code:
    if(!is_array($pages[$_REQUEST['activeTab']]['columns'][0]['dashlets'])) $pages[$_REQUEST['activeTab']]['columns'][0]['dashlets'] = array();
    and it didn't work. I commented out the line under it that said
    Code:
    require_once($dashlets[$id]['fileLocation']);
    and then it came up with doesn't understand "class".

    So still at square one on this issue.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PHP Warnings after install add-in Module
    By kgeving in forum Help
    Replies: 1
    Last Post: 2006-08-08, 05:54 PM
  2. Replies: 0
    Last Post: 2006-07-03, 09:54 AM
  3. ERROR in 4.01
    By rateck in forum Help
    Replies: 3
    Last Post: 2006-02-02, 10:00 PM
  4. Multiple errors
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-11, 05:02 PM
  5. Errors when importing
    By amoslmeditabcom693427 in forum Help
    Replies: 0
    Last Post: 2004-11-09, 05:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •