Support » Plugin: Image Gallery - Grid Gallery » PHP Notice: Undefined variable

  • Resolved ma3ry


    Can you please help me fix a PHP Notice in debug.log file as follows:

    PHP Notice: Undefined variable: comment_id in /public_html/wp-content/plugins/Gallery/Gallery.php on line 39

    Thank you.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author richteam


    Dear @ma3ry.

    Thank You for posting your question. Now I will say you how to solve that problem. Please open that file where it says you have that problem, find there comment_id and add this 2 rows before it.

    $bare_url = ”; $comment_id = ”;

    It will help You to solve your problem.

    Thank You.



    Thank you so much. Can you tell me please exactly where I put this line of code. I have tried it in several places but I still get the error.

    35. add_action(“admin_menu”, ‘Rich_Web_Gallery_Admin_Menu’ );
    36. function Rich_Web_Gallery_Admin_Menu()
    37. {
    38. $complete_url = wp_nonce_url( $bare_url, ‘edit-menu_’.$comment_id, ‘Rich_Web_Gallery_Nonce’ );
    39. add_menu_page(‘Rich-Web Gallery Admin’ . $complete_url,’Image Gallery’,’manage_options’,’Rich-Web Gallery Admin’ .
    40. add_submenu_page( ‘Rich-Web Gallery Admin’ . $complete_url, ‘Rich-Web Gallery Admin’, ‘Gallery Manager’, ‘manage_options’, ‘Rich-Web Gallery Admin’ . $complete_url, ‘Manage_Rich_Web_Gallery_Admin’);



    Tech support has once again come to my rescue and has fixed the issue in a very timely manner. Thank you!

    • This reply was modified 9 months ago by  ma3ry.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘PHP Notice: Undefined variable’ is closed to new replies.