Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages »

PHP Notice: Undefined index: bfa_ata_noncename


  #1  
Old Feb 12, 2013, 10:49 AM
codered
 
1 posts · Feb 2013
This has just happened:
----------------------
PHP Notice: Undefined index: bfa_ata_noncename
wp-content/themes/atahualpa/functions.php on line 661

I'm using the latest Atahualpa (3.7.10) with the latest version of wordpress on shared hosting.
Here's what's on line 661:
Code:
if ( !wp_verify_nonce( $_POST['bfa_ata_noncename'], plugin_basename(__FILE__) )) {
    return $post_id;
As fas as I can see, it's a security feature to prevent Cross-Site Request Forgeries (http://codex.wordpress.org/WordPress_Nonces)
A random, one time use token (the 'nonce' - nothing to do with the pejorative meaning of the word in British English, it's short for 'number used once') is set in the form displayed on a custom box on the page.

The routine doing this is in function bfa_ata_inner_custom_box() on line 589:

Code:
echo '<input type="hidden" name="bfa_ata_noncename" id="bfa_ata_noncename" value="' . 
    wp_create_nonce( plugin_basename(__FILE__) ) . '" />';
It uses the absolute path and filename of functions.php as the 'seed' for the token.

The token is verified when the form is processed by bfa_ata_save_postdata - if they're the same, the form is genuine.

The bfa_ata_save_postdata function wants to save the post in the database, but $_POST['bfa_ata_noncename'] does not exist, hence the error - don't know why, it should be OK.

I'm suffering an error on my wp install, so this could be specific to me but I thought I'd post here as I can't find much elsewhere and it might help someone.

I wrapped the line with a check, that fixed it but it won't survive the next upgrade:
Code:
if (isset($_POST['bfa_ata_noncename'])) {//fix130212a
  if ( !wp_verify_nonce( $_POST['bfa_ata_noncename'], plugin_basename(__FILE__) )) {
    return $post_id;
  }
  }
  #2  
Old Feb 12, 2013, 01:26 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
Perhaps a reinstall of WordPress and/or Atahualpa would "fix"
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Notice: Undefined variable: odd_or_even in bfa://content_inside_loop on line 6 tasha Center area post/pages 2 Apr 7, 2011 01:57 PM
C.prototype is undefined rfgoetz Atahualpa 3 Wordpress theme 0 Oct 16, 2010 03:45 PM
Call to undefined function the_post_thumbnail() anatta Page & Category Menu Bars 3 Jan 23, 2010 08:47 AM


All times are GMT -6. The time now is 12:17 PM.


Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.