Skip to main content
added 131 characters in body
Source Link

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

Notice the error is on pluggable.php on line 876

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

add_action( 'init', 'CCaddNewLink' );
function CCaddNewLink(){
    wp_redirect(home_url());
    exit;
}
//wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

Notice the error is on pluggable.php on line 876

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

Notice the error is on pluggable.php on line 876

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

add_action( 'init', 'CCaddNewLink' );
function CCaddNewLink(){
    wp_redirect(home_url());
    exit;
}
//wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}
added 58 characters in body
Source Link

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

Notice the error is on pluggable.php on line 876

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

Notice the error is on pluggable.php on line 876

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}
added 384 characters in body
Source Link

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error.

enter image description here

I have checked many sources but unable to find the solution so far

  1. I have used wp_redirect('admin.php?page=ccURLList'); exit; it gives the attached error
  2. I have used no-header in the query string of form submission, it does work but in case of any error I wanted to show the page again and that page is without any sidebar or wp stuff
  3. When i move the wp_redirect to my main file clickCounter.php it says function is unknown

If any of you can resolve this issue, it will be highly appreciated.

EDIT

clickCounter.php is my main file. It creates menus etc.

I have a list page which is working.

I have an add page. I have put the wp_redirect on the very first lines after <?php tag

<?php
// ccURLAdd.php my add page
if (!defined('ABSPATH'))
    die('You are not allowed to call this page directly.');

wp_redirect('admin.php?page=click-counter');
exit;

Below is my main file

<?php
// clickCounter.php my main page.
/* some plugin info */
add_action('admin_menu', 'ccAdminMenu');
function ccAdminMenu()
{
    add_menu_page("Click Counter", "Click Counter", 8, 'click-counter', "ccAdminMenuListUrls", CC_HTML_WEB . "/images/icon.png");
    add_submenu_page('click-counter', 'Add New Link', 'Add Link', 8, 'click-counter-url-new', 'ccAdminAddUrl');

}
function ccAdminAddUrl()
{
    include 'ccURLAdd.php';
}
Source Link
Loading