Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

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, 11: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, 02:26 PM
lmilesw's Avatar
lmilesw
 
10,176 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



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 02:57 PM
C.prototype is undefined rfgoetz Atahualpa 3 Wordpress theme 0 Oct 16, 2010 04:45 PM
Call to undefined function the_post_thumbnail() anatta Page & Category Menu Bars 3 Jan 23, 2010 09:47 AM


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


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