Results 1 to 6 of 6

Thread: Warning: array_slice() Error in tasks

  1. #1
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Warning: array_slice() Error in tasks

    Warning: array_slice() [function.array-slice]: The first argument should be an array in /var/www/VantageCRM/include/SubPanel/SugarTab.php on line 73

    Warning: array_slice() [function.array-slice]: The first argument should be an array in /var/www/VantageCRM/include/SubPanel/SugarTab.php on line 76

    Warning: array_slice() [function.array-slice]: The first argument should be an array in /var/www/VantageCRM/include/SubPanel/SugarTab.php on line 90

    Warning: array_slice() [function.array-slice]: The first argument should be an array in /var/www/VantageCRM/include/SubPanel/SugarTab.php on line 91

    I am getting this error when viewing a task. I haven't seem anyone else reporting this error accept in custom built modules. I do have 1 custom module that I have tried to uninstall (module loader) but it still shows up in my list of modules. I am unable to find any obvious solutions so any input on what could cause this error would be appreciated.

  2. #2
    dpatech is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    NC
    Posts
    287

    Default Re: Warning: array_slice() Error in tasks

    I think this is related to a sub-panel or relationship definition for the custom module that was installed. You may need to check in the custom/modules/tasks/Ext/Layoutts and custom/Extensions/modules/Tasks/Ext/Layoutdefs for metadata files and clean them up.
    - Sugar Team
    dpa Technology LLC
    e-mail: dpaDeveloper@dpatechnology.com
    web: http://www.dpatechnology.com

  3. #3
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Re: Warning: array_slice() Error in tasks

    Thanks for the response.

    I looked in the files you mentioned in /custom/modules/Tasks/Ext/, and found reference to the custom module in them both the layoutdefs and the vardefs. I commented out those lines via /* and */. I then did a quick repair, but alas I am still getting the error.

    Any other suggestions. Is there some way to completely remove the module causing the problem? The module loader does not give me the option to uninstall anymore, although it does show up in the list.

    Thanks

  4. #4
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Re: Warning: array_slice() Error in tasks

    Anyone have any other ideas?

  5. #5
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Re: Warning: array_slice() Error in tasks

    I have looked into this a bit further and at least seem to have an idea of what is happening. The custom module I tried to remove is still there. And the references to the subpanel are there in the custom/modules/Tasks/Ext/ files. I remove them and save, but after doing a quick repair they are back again. Something appears to be re-writing these files and therefore my changes get overwritten and the problem persits.

    I have 2 questions:

    1. How do I stop these files from being re-written
    2. How do I completely remove the custom(module builder) module, since module loader didn't do the job.

  6. #6
    Iggby's Avatar
    Iggby is offline Sugar Community Member
    Join Date
    Feb 2008
    Location
    Huntingtonton Beach, Ca
    Posts
    101

    Default Re: Warning: array_slice() Error in tasks

    Well I finally stumbled around long enough to find a solution to my problem. In the event anybody else is having the same issue which seems doubtful from the lack of interest in my posts on the subject I am posting the solution I found.

    First I manually removed my custom module which wasn't too bad and is documented in another thread.

    That having not solved the issue in my case despite seeming to help others with a similar problem, I dove deeper into the problem. After digging around it seems my problem was being caused by the option Subpanel Tabs being selected on the MyAccount page under Layout Options. Simply unchecking this option solved the problem. Since we didn't use them anyway thats as far as I am going for now. Long story short it added the following code to the detailview which seemed to have a problem in the Tasks module. I tried to duplicate the issue another system but it didn't have the same result. With that option selected my installation had additional code that the other did not when viewing the soucrce of the output html.

    Code:
    <br />
    <b>Warning</b>:  array_slice() [<a href='function.array-slice'>function.array-slice</a>]: The first argument should be an array in <b>/var/www/VantageCRM/include/SubPanel/SugarTab.php</b> on line <b>73</b><br />
    <br />
    <b>Warning</b>:  array_slice() [<a href='function.array-slice'>function.array-slice</a>]: The first argument should be an array in <b>/var/www/VantageCRM/include/SubPanel/SugarTab.php</b> on line <b>76</b><br />
    
    <br />
    <b>Warning</b>:  array_slice() [<a href='function.array-slice'>function.array-slice</a>]: The first argument should be an array in <b>/var/www/VantageCRM/include/SubPanel/SugarTab.php</b> on line <b>90</b><br />
    <br />
    <b>Warning</b>:  array_slice() [<a href='function.array-slice'>function.array-slice</a>]: The first argument should be an array in <b>/var/www/VantageCRM/include/SubPanel/SugarTab.php</b> on line <b>91</b><br />
    
    
    <script>
    	SUGAR.subpanelUtils.currentSubpanelGroup = 'All';
    	
    	SUGAR.subpanelUtils.subpanelMoreTab = '';
    	
    	SUGAR.subpanelUtils.subpanelMaxSubtabs = '12';
    	
    	SUGAR.subpanelUtils.subpanelHtml = new Array();
    	
    	SUGAR.subpanelUtils.loadedGroups = Array();
    	SUGAR.subpanelUtils.loadedGroups.push('All');
    	
    	SUGAR.subpanelUtils.subpanelSubTabs = new Array();
    	SUGAR.subpanelUtils.subpanelGroups = new Array();
    	SUGAR.subpanelUtils.subpanelGroups[''] = [];
    
    	SUGAR.subpanelUtils.subpanelTitles = {};
    
    	SUGAR.subpanelUtils.tabCookieName = get_module_name() + '_sp_tab';
    	
    	SUGAR.subpanelUtils.showLinks = false;
    	
    	SUGAR.subpanelUtils.requestUrl = 'index.php?to_pdf=1&module=MySettings&action=LoadTabSubpanels&loadModule=Tasks&record=4b2aafc2-d6d5-46f9-abb6-47b35c36c354&subpanels=';
    </script>
    
    
    
    <ul class="subpanelTablist" id="groupTabs">
    	<li id="_sp_tab">
    		<a class="current" href="javascript:SUGAR.subpanelUtils.loadSubpanelGroup('');"></a>
    	</li>
    </ul>
    
    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="subpanelTabForm" style="border-top: 0px none; margin-bottom: 4px;">
    
    	<tr>
    		<td>
    Other code showing up in my install that is not in the other system that I cannot identify as being related to anything I installed is

    Code:
    <script type="text/javascript" src="include/SubPanel/SubPanelTiles.js?s=5.0.0b&c="></script><script>
    if(document.DetailView != null && 
       document.DetailView.elements != null && 
       document.DetailView.elements.layout_def_key != null && 
       typeof document.DetailView.elements['layout_def_key'] != 'undefined'){
        document.DetailView.elements['layout_def_key'].value = 'Tasks';
    }
    </script>
    <ul class="noBullet" id="subpanel_list"><li style="height: 5px" class="noBullet">&nbsp;&nbsp;&nbsp;</li></ul>    <script>
        	var SubpanelInit = function() {
        		SubpanelInitTabNames([""]);
        	}
            var SubpanelInitTabNames = function(tabNames) {
        		subpanel_dd = new Array();
        		j = 0;
        		for(i in tabNames) {
        			subpanel_dd[j] = new ygDDList('whole_subpanel_' + tabNames[i]);
        			subpanel_dd[j].setHandleElId('subpanel_title_' + tabNames[i]);
        			subpanel_dd[j].onMouseDown = SUGAR.subpanelUtils.onDrag;  
        			subpanel_dd[j].afterEndDrag = SUGAR.subpanelUtils.onDrop;
        			j++;
        		}
        	
        		YAHOO.util.DDM.mode = 1;
        	}
        	currentModule = 'Tasks'; 
        	YAHOO.util.Event.addListener(window, 'load', SubpanelInit);
        </script>  <!-- crmprint --><script>		if(window.addEventListener){
    			window.addEventListener("load", checkAlerts, false);
    		}else{
    			window.attachEvent("onload", checkAlerts);
    		}
    As I said the elimination of Subpanel Tabs solved my problem and I can live with it, but I am offering this info in case someone else can identify what this code is or has a similar problem.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Module with no SubPanels
    By dop3 in forum Developer Help
    Replies: 3
    Last Post: 2008-06-29, 06:24 PM
  2. Uninstalling a test module
    By ACMartin55 in forum Help
    Replies: 0
    Last Post: 2006-09-12, 08:13 PM
  3. Replies: 0
    Last Post: 2006-07-03, 09:54 AM
  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
  •