Preview with Custom Post Type Not Working

One of the parameter that you can pass to the supports argument is post_formats, removing this argument will fix the problem with the preview redirecting to a wrong or non-existing url.
Code sample:

    if ( ! function_exists('custom_post_type') ) {

    // Register Custom Post Type
    function custom_post_type() {

        // some code

        $args = array(
            // 'supports'            => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'post-formats', 'comments', 'sticky'),
            'supports'            => array( 'title', 'editor', 'author', 'thumbnail', 'revisions', 'comments', 'sticky'),
            'taxonomies'          => array( 'category', 'post_tag', 'your_cpt_pictures', 'your_cpt_updates', 'your_cpt_outline' ),
            'capability_type'     => 'post'
        );
        register_post_type( 'your_cpt', $args );

    }

    // Hook into the 'init' action
    add_action( 'init', 'custom_post_type', 0 );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)