Title: Fatal Error
Last modified: August 20, 2016

---

# Fatal Error

 *  Resolved [Jessica](https://wordpress.org/support/users/jessshailes/)
 * (@jessshailes)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-686/)
 * On the profile page where the option to upload an avatar is featured there is
   the following message: Fatal error: Call to undefined function submit_button()
   in /home/gingerda/public_html/wp-content/plugins/avatar-manager/avatar-manager.
   php on line 304
 * This features under where you can select the image to upload where I presume 
   the upload button is. Looks like a great plugin is this was resolved.
 * [http://wordpress.org/extend/plugins/avatar-manager/](http://wordpress.org/extend/plugins/avatar-manager/)

Viewing 15 replies - 1 through 15 (of 15 total)

 *  Plugin Author [Cătălin Dogaru](https://wordpress.org/support/users/cdog/)
 * (@cdog)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579027)
 * Hello Jessica,
 * Thank you for reporting. It may be a problem with your current WordPress install
   as the submit_button() function is defined in wp-admin/includes/template.php.
   Try reinstalling from a fresh download of WordPress.
 * Please let me know if it helps.
 * Best regards,
    Cătălin Dogaru
 *  Thread Starter [Jessica](https://wordpress.org/support/users/jessshailes/)
 * (@jessshailes)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579166)
 * Hi I tried re installing wordpress and unfortunately it’s still there. I checked
   the file you mention and the ‘submit_button()’ function appears to be there but
   I’m not sure how it’s supposed to look. At the moment mentions of it are as follows:
 *     ```
       function get_submit_button( $text = null, $type = 'primary large', $name = 'submit', $wrap = true, $other_attributes = null ) {
       	if ( ! is_array( $type ) )
       		$type = explode( ' ', $type );
       ```
   
 * `$r .= get_submit_button( __( 'Delete' ), 'deletemeta small', "deletemeta[{$entry['
   meta_id']}]", false, array( 'data-wp-lists' => "delete:the-list:meta-{$entry['
   meta_id']}::_ajax_nonce=$delete_nonce" ) );`
    `$r .= get_submit_button( __( '
   Update' ), 'updatemeta small', "meta-{$entry['meta_id']}-submit", false, array('
   data-wp-lists' => "add:the-list:meta-{$entry['meta_id']}::_ajax_nonce-add-meta
   =$update_nonce" ) );`
 *     ```
       <div class="submit">
       <?php submit_button( __( 'Add Custom Field' ), 'secondary', 'addmeta', false, array( 'id' => 'newmeta-submit', 'data-wp-lists' => 'add:the-list:newmeta' ) ); ?>
       </div>
       ```
   
 * `<?php submit_button( __('Upload file and import'), 'button' ); ?>`
 *     ```
       <div class="find-box-buttons">
       			<input id="find-posts-close" type="button" class="button alignleft" value="<?php esc_attr_e('Close'); ?>" />
       			<?php submit_button( __( 'Select' ), 'button-primary alignright', 'find-posts-submit', false ); ?>
       		</div>
       ```
   
 * Jess
 *  Plugin Author [Cătălin Dogaru](https://wordpress.org/support/users/cdog/)
 * (@cdog)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579170)
 * Hi Jess,
 * This is strange. It should work out of the box with a fresh install of WordPress
   3.5 or higher.
 * Have you tried disabling all plugins, except Avatar Manager? If the error persists,
   please contact me through this [contact form](http://swarm.cs.pub.ro/~cdogaru/#get-in-touch).
   If you don’t mind, I would like to take a look.
 * Thanks,
    Cătălin
 *  Plugin Author [Cătălin Dogaru](https://wordpress.org/support/users/cdog/)
 * (@cdog)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579211)
 * Also, you can try to replace line 304 in **avatar-manager.php**:
 *     ```
       <?php submit_button( __( 'Upload', 'avatar-manager' ), 'button', 'avatar-manager-upload-avatar', false ); ?>
       ```
   
 * with:
 *     ```
       <input class="button" id="avatar-manager-upload-avatar" name="avatar-manager-upload-avatar" type="submit" value="Upload">
       ```
   
 * Please let me know if this helps.
 *  Plugin Author [Cătălin Dogaru](https://wordpress.org/support/users/cdog/)
 * (@cdog)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579227)
 * Closing the ticket due to lack of feedback from the reporter.
 *  [vincentweb2](https://wordpress.org/support/users/vincentweb2/)
 * (@vincentweb2)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579237)
 * hi catalin dogaru,
    i hope you can help me, with the code. `<input class="button"
   id="avatar-manager-upload-avatar" name="avatar-manager-upload-avatar" type="submit"
   value="Upload">` it works, it save me for awhile but after i hit the upload button
   i got this message. –>File is empty. Please upload something more substantial.
   This error could also be caused by uploads being disabled in your php.ini or 
   by post_max_size being defined as smaller than upload_max_filesize
 * fyi i’m using custom page to display the profile page in blogs, before this; 
   with the ‘submit_button()’ function it total give me fatal error.
 *  Plugin Author [Cătălin Dogaru](https://wordpress.org/support/users/cdog/)
 * (@cdog)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579240)
 * Hi vincentweb2,
 * Please make sure that you have set the `enctype` attribute of your form. It specifies
   how the form-data should be encoded when submitting it to the server. The `multipart/
   form-data` value is required when you are using forms that have a file upload
   control.
 * Avatar Manager uses the following JavaScript code on profile pages:
    `jQuery('#
   your-profile' ).attr( 'enctype', 'multipart/form-data' );`
 * Please let me know if it helps.
 * Thank you,
    Cătălin Dogaru
 *  [vincentweb2](https://wordpress.org/support/users/vincentweb2/)
 * (@vincentweb2)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579241)
 * hi Cătălin Dogaru, thank you for your response. it always works in wp-admin/profile.
   php but dont work in the PAGE. Isn’t Avatar Manager will take care of the enctype?
   and also i added encoding for IE which is also work; what i mean is the uploaded
   avatar will work & show nicely in wp-admin/profile.php & Page. what dont work
   is i cant upload or edit avatar in the Page.
 * as the Page(custom); i’m using the 3rd party plugin. i contacted the plugin’s
   author which he reply nothing to do with his plugin.
    i’m not a programmer 🙂
   but i know both are great plugins! i tried conclusion it failed.
 * From Vincent
 *  Thread Starter [Jessica](https://wordpress.org/support/users/jessshailes/)
 * (@jessshailes)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579242)
 * Thanks does appear to be working for me now…
 * Jess
 *  [Artem Frolov](https://wordpress.org/support/users/dikiy_forester/)
 * (@dikiy_forester)
 * [13 years ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579256)
 * Hello, Cătălin!
 * First, I must say, great work on this plugin!
 * We are work with themes by Appthemes, which uses both profile editing pages in
   the frontend (separated template for PAGE) and in backend (standard admin profile
   page). And so we have same error indicated in the first post.
 * In my view, first problem is that the function submit_button() located in file
   template.php, which loaded only in backend, but not in frontend.
 * Second problem we found, is that avatar form adapted for use only in the backend.
   (
   avatar-manager.php v1.3.0 lines 644 – 655 ).
 * Many users can not use your great plugin is only because of these problems.
    
   So maybe, can you review logic for frontend using?
 * Thank You!
 *  [Artem Frolov](https://wordpress.org/support/users/dikiy_forester/)
 * (@dikiy_forester)
 * [13 years ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579257)
 * Hello!
 * I made ​​a few changes, and now the plugin works fine in the frontend.
    You can
   view them in [pull request](https://github.com/resourcestream/avatar-manager/pull/1)
   on GitHub.
 * Сhanges a little gruff, but work 🙂
 * Hope you consider it.
 *  Plugin Author [Cătălin Dogaru](https://wordpress.org/support/users/cdog/)
 * (@cdog)
 * [13 years ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579258)
 * Hi dikiy_forester,
 * Thank you for choosing to contribute to Avatar Manager!
 * Just merged your pull request. Changes will become available in the new version
   of the plugin.
 * Cheers,
    Cătălin
 *  [Artem Frolov](https://wordpress.org/support/users/dikiy_forester/)
 * (@dikiy_forester)
 * [13 years ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579259)
 * Thank you, Cătălin!
 * I reported this on AppThemes forum.
    And I hope that soon you will have new downloads,
   reviews, and donations! 🙂
 * Good Luck!
 * Artem
 *  Plugin Author [Cătălin Dogaru](https://wordpress.org/support/users/cdog/)
 * (@cdog)
 * [13 years ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579260)
 * Hi Artem,
 * Just packed version 1.4.0. Please let me know if it works as expected.
 * Best regards,
    Cătălin
 *  [Artem Frolov](https://wordpress.org/support/users/dikiy_forester/)
 * (@dikiy_forester)
 * [13 years ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579261)
 * Hi, Cătălin!
 * Just tested and all works.
    Thanks, Your efforts are very much appreciated!
 * I wish you every success 🙂
 * Artem

Viewing 15 replies - 1 through 15 (of 15 total)

The topic ‘Fatal Error’ is closed to new replies.

 * ![](https://ps.w.org/avatar-manager/assets/icon-256x256.png?rev=1979607)
 * [Avatar Manager](https://wordpress.org/plugins/avatar-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/avatar-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/avatar-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/avatar-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/avatar-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/avatar-manager/reviews/)

## Tags

 * [fatal error](https://wordpress.org/support/topic-tag/fatal-error/)

 * 15 replies
 * 4 participants
 * Last reply from: [Artem Frolov](https://wordpress.org/support/users/dikiy_forester/)
 * Last activity: [13 years ago](https://wordpress.org/support/topic/fatal-error-686/#post-3579261)
 * Status: resolved