solved Skin Settings Error

gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
Hey Guys,

I added this to my sites config file,

    // Index Welcome Message
    $_tmp = array(
        'name'     => 'welcome_message',
        'type'     => 'editor',
        'default'  => '',
        'validate' => '',
        'label'    => 'Welcome Message',
        'help'     => 'Enter your welcome message here',
        'section'  => 'Visitor Homepage',
        'order'    => 40
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 1 heading
    $_tmp = array(
        'name'     => 'block1_heading',
        'type'     => 'text',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 1 Heading',
        'help'     => 'Enter the heading for block 1 here',
        'section'  => 'Visitor Homepage',
        'order'    => 41
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 1 content
    $_tmp = array(
        'name'     => 'block1_content',
        'type'     => 'editor',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 1 Content',
        'help'     => 'Enter the content for block 1 here',
        'section'  => 'Visitor Homepage',
        'order'    => 42
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 2 Heading
    $_tmp = array(
        'name'     => 'block2_heading',
        'type'     => 'text',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 2 Heading',
        'help'     => 'Enter the heading for block 2 here',
        'section'  => 'Visitor Homepage',
        'order'    => 43
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 2 content
    $_tmp = array(
        'name'     => 'block2_content',
        'type'     => 'editor',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 2 Content',
        'help'     => 'Enter the content for block 2 here',
        'section'  => 'Visitor Homepage',
        'order'    => 44
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 3 Heading
    $_tmp = array(
        'name'     => 'block3_heading',
        'type'     => 'text',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 3 Heading',
        'help'     => 'Enter the heading for block 3 here',
        'section'  => 'Visitor Homepage',
        'order'    => 45
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 3 content
    $_tmp = array(
        'name'     => 'block3_content',
        'type'     => 'editor',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 3 Content',
        'help'     => 'Enter the content for block 3 here',
        'section'  => 'Visitor Homepage',
        'order'    => 46
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 4 Heading
    $_tmp = array(
        'name'     => 'block4_heading',
        'type'     => 'text',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 4 Heading',
        'help'     => 'Enter the heading for block 4 here',
        'section'  => 'Visitor Homepage',
        'order'    => 47
    );
    jrCore_register_setting('gmPlugu',$_tmp);

    // Block 4 content
    $_tmp = array(
        'name'     => 'block4_content',
        'type'     => 'editor',
        'default'  => '',
        'validate' => '',
        'label'    => 'Block 4 Content',
        'help'     => 'Enter the content for block 4 here',
        'section'  => 'Visitor Homepage',
        'order'    => 48
    );
    jrCore_register_setting('gmPlugu',$_tmp);

and run the integrity checks, but when I update the setting sin skin settings I get

invalid jrCore_checktype:

I can update settings in all other sections of the skin settings fine, so it must be something with this code but I cant see anything obvious.
updated by @garymoncrieff: 01/03/15 12:37:01PM
michael
@michael
11 years ago
7,805 posts
First thing I'd try would be getting rid of the empty validate sections.

other locations that call for the editor use:
        'type'     => 'editor',
        'validate' => 'allowed_html',
        'required' => true

so try dropping the 'validate' => '' as it seams related to the "invalid jrCore_checktype:" message.
gary.moncrieff
gary.moncrieff
@garymoncrieff
11 years ago
865 posts
Thank you that was the issue added allowed_html to editor and not_empty to text fields and that fixed it.
brian
@brian
11 years ago
10,149 posts
Glad that fixed it up - thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags