WordPress.org

Ready to get started?Download WordPress

Forums

WORDPRESS VIDEO GALLERY
error on [videohome] page (3 posts)

  1. David Robinson
    Member
    Posted 1 year ago #

    warning: Division by zero in C:\Users\David\Google Drive\htdocs\Sonna_rele\wp-content\plugins\contus-video-gallery\front\views\videomore.php on line 219

    is the error message.

    http://wordpress.org/plugins/contus-video-gallery/

  2. ctmaloney
    Member
    Posted 1 year ago #

    I have the same error.

    Thanks,
    Chris

  3. karthikeyani
    Member
    Posted 1 year ago #

    Hi,

    Please open \wp-content\plugins\contus-video-gallery\front\views\videomore.php and go to line 219 and find the below code

    //PAGINATION STARTS
    $total          = $CountOFVideos;
    $num_of_pages   = ceil($total / $dataLimit);
    $page_links     = paginate_links(array(
    'base'      => add_query_arg('pagenum', '%#%'),
    'format'    => '',
    'prev_text' => __('«', 'aag'),
    'next_text' => __('»', 'aag'),
    'total'     => $num_of_pages,
    'current'   => $pagenum
    ));
    
    if ($page_links) {
    $div .='<div class="tablenav"><div class="tablenav-pages" >' . $page_links . '</div></div>';
    }
    //PAGINATION ENDS

    Now replace with the following code.

    if($dataLimit!=0){
    //PAGINATION STARTS
    $total          = $CountOFVideos;
    $num_of_pages   = ceil($total / $dataLimit);
    $page_links     = paginate_links(array(
    'base'      => add_query_arg('pagenum', '%#%'),
    'format'    => '',
    'prev_text' => __('«', 'aag'),
    'next_text' => __('»', 'aag'),
    'total'     => $num_of_pages,
    'current'   => $pagenum
    ));
    
    if ($page_links) {
    $div .='<div class="tablenav"><div class="tablenav-pages" >' . $page_links . '</div></div>';
    }
    //PAGINATION ENDS
    }

    Kindly note that you must have entered rows or/and columns as zero for "Featured" , "Recent", "Popular", "Category" videos in admin video gallery settings page. So that this issue happened.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.