Support

Home Forums Event Espresso Premium Problem nonce

Problem nonce

Posted: May 31, 2014 at 5:00 pm

Viewing 3 reply threads


Shashnk Mehta

May 31, 2014 at 5:00 pm

Hello,

I am developing on theme and getting this error when updating an event, please help:

THEME.PHP:

if ( isset($_REQUEST[‘ee_fem_action’]) && $_REQUEST[‘ee_fem_action’] == ‘ee_fem_add’) {
import update_event
return update_event();
}

<form>
<input name=”event”>

<?php wp_nonce_field(‘espresso_verify_insert_nonce’, ‘nonce_verify_insert_event’); //Security check using nonce ?>
<input class=”button” type=”submit” name=”Submit” value=”<?php _e(‘Submit Event’, ‘event_espresso’); ?>” id=”add_new_event” />
</form>

But on update.php it doesnt pass the if:
if ( empty($_POST[‘nonce_verify_update_event’]) || !wp_verify_nonce($_POST[‘nonce_verify_update_event’],’espresso_verify_update_event_nonce’) ){ display ERROR, EXIT.

I tried changing on theme.php the nonce parameters like this:
<?php wp_nonce_field(‘espresso_verify_update_nonce’, ‘nonce_verify_update_event’);

But still not working.
Can you help me to figure out whats happening?

Thanks.


Josh

  • Support Staff

June 2, 2014 at 9:29 am

Hi Shashnk,

Can you try adding a hidden input like this:

<?php wp_nonce_field('espresso_verify_insert_event_nonce', 'nonce_verify_insert_event'); //Security check using nonce ?>
<input type="hidden" name="ee_fem_action" value="ee_fem_add" />


Shashnk Mehta

June 4, 2014 at 1:48 am

Thanks!


Dean

June 4, 2014 at 2:34 am

Hi,

Has this issue been resolved? If so please mark the thread as resolved from the box in the top right of the page. Thanks!

Viewing 3 reply threads

The support post ‘Problem nonce’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso