Getting error messages when CMS plugin is enabled

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • renlok
    New Member
    • Mar 2009
    • 3
    • 3.8.x

    [CMS] Getting error messages when CMS plugin is enabled

    When I enable the CMS plugin I get the following error message:

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/includes/class_bootstrap.php(1309) : eval()'d code on line 13

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in [path]/includes/class_bootstrap.php(1309) : eval()'d code on line 32
    I only get it on none CMS pages (other parts of the forum) I also konw its just the CMS plugin causing this I disabled all my plugins except the CMS one and get the message but if i disable the CMS plugin the message goes away. Anyone have any clue how to fix this or atleast point me in the direction of the code I could look at to try fix it?


    EDIT: nevermind found the problem it was with the Cache Templates: CMS plugin $this->group_templates is set to NULL when your not looking at a CMS page which obviously isn't an array
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73441
    • 6.0.X

    #2
    Should not set to null anywhere in the plugin. The valid code for that plugin is:

    Code:
    if (THIS_SCRIPT == 'search') 
    { 
        $cache[] = 'vbcms_searchresult_article_general'; 
        $cache[] = 'vbcms_searchresult_staticpage_general'; 
    } 
    
    if (THIS_SCRIPT == 'activity' OR THIS_SCRIPT == 'member') 
    { 
        $cache[] = 'activitystream_cms_comment'; 
        $cache[] = 'activitystream_cms_article'; 
    } 
    
    if (in_array('vbcms.content', $this->group_templates)) 
    { 
        $cache = array_merge($cache, 
            array( 
            'page', 
            'vbcms_page', 
            'vbcms_toolbar', 
            'bbcode_video', 
            'tagbit_wrapper', 
            'vbcms_article_css', 
            'error_message', 
            ) 
        ); 
    
        $this->group_templates[] = 'vbcms.grid'; 
        $this->group_templates[] = 'vbcms.widget'; 
        $this->group_templates[] = 'vbcms.searchresult'; 
    } 
    
    if (in_array('vbcms.edit', $this->group_templates)) 
    { 
        $cache = array_merge($cache, 
            array( 
                'postbit_ip', 
                'postbit_wrapper', 
                'postbit_onlinestatus', 
                'tagbit_wrapper', 
            ) 
        ); 
    
        $this->group_templates[] = 'class.editor'; 
        $this->group_templates[] = 'class.newpost'; 
        $this->group_templates[] = 'vbcms.postbit'; 
    }
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
    Working...
    😀
    😂
    🥰
    😘
    🤢
    😎
    😞
    😡
    👍
    👎