Title: Fatal error when setting template
Last modified: March 31, 2021

---

# Fatal error when setting template

 *  Resolved [Helen](https://wordpress.org/support/users/web09/)
 * (@web09)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-when-setting-template/)
 * Hello,
    We reinstalled the Giveplugin after a migration and now whenever I try
   to set the template (either the legacy form or the multi step donation form),
   wordpress shows the following fatal error:
 * > `Fatal error: Uncaught Error: Class name must be a valid object or a string
   > in /home/customer/www/xxx.com/public_html/wp-content/plugins/give/src/Form/
   > Templates.php:112 Stack trace: #0 /home/customer/www/xxx.com/public_html/wp-
   > content/plugins/give/src/Form/Templates.php(98): Give\Form\Templates->getTemplateObject(”)#
   > 1 /home/customer/www/xxx.com/public_html/wp-content/plugins/give/src/Helpers/
   > Form/Template.php(50): Give\Form\Templates->getTemplate(”) #2 /home/customer/
   > www/xxx.com/public_html/wp-content/plugins/give/includes/admin/forms/class-
   > metabox-form-data.php(1109): Give\Helpers\Form\Template::saveOptions(9707, 
   > Array) #3 /home/customer/www/xxx.com/public_html/wp-includes/class-wp-hook.
   > php(294): Give_MetaBox_Form_Data->save_form_template_settings(‘_give_form_temp…’,‘
   > legacy’, 9707) #4 /home/customer/www/xxx.com/public_html/wp-includes/class-
   > wp-hook.php(316): WP_Hook->apply_filters(”, Array) #5 /home/customer/www/xxx.
   > com/public_html/wp-includes/plugin.php(484): WP_Hook->do_a in /home/customer/
   > www/xxx.com/public_html/wp-content/plugins/give/src/Form/Templates.php on line
   > 112`
 * I tried troubleshooting the plugins and check for conflicts and it doesn’t seedm
   to come from there. I deactivated all plugins except the GivePlugin and it still
   gives the error. I tried updating the plugin to the newest version 2.10.1 and
   it’s the same, same error. I also tried deleting and reinstalling the plugin 
   and it still gives the error.
    How can we solve this?
 * THank you!
    -  This topic was modified 5 years, 2 months ago by [Helen](https://wordpress.org/support/users/web09/).

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

 *  Plugin Support [Rick Alday](https://wordpress.org/support/users/mrdaro/)
 * (@mrdaro)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/fatal-error-when-setting-template/#post-14260831)
 * Hi [@web09](https://wordpress.org/support/users/web09/),
 * Here’s what you can do. Backup your site first.
 * 1) Deactivate all plugins except for GiveWP.
    2) Go to Donations -> Settings -
   > Advanced, and enable Advanced Database Updates. 3) Go to Donations -> Tools-
   > Data, and run the database updates 4) Go to Donations -> Settings -> Advanced,
   and disable Advanced Database Updates.
 * Also, include your system information found in Donations -> Tools -> System Info.
 * This data gives us a general overview of your environment and can help us troubleshoot
   faster.
 * Thanks!
 *  Thread Starter [Helen](https://wordpress.org/support/users/web09/)
 * (@web09)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-when-setting-template/#post-14263411)
 * Hi,
    Just followed the steps. The same Fatal error shows when setting the template.
   Here is the data info:
 *     ```
       ### WordPress Environment ###
   
       Home URL: https://arboreal.life
       Site URL: https://arboreal.life
       WP Version: 5.7
       WP Multisite: –
       WP Memory Limit: 768 MB
       WP Debug Mode: –
       WP Cron: ✔
       Language: en
       Permalink Structure: /%postname%/
       Show on Front: page
       Page on Front: HOME (#14470)
       Page for Posts: Unset
       Table Prefix Length: xzhlb_
       Table Prefix Length: 6
       Table Prefix Status: Acceptable
       Admin AJAX: Accessible
       Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, refunded, failed, revoked, cancelled, abandoned, processing, preapproval
   
       ### Server Environment ###
   
       Hosting Provider: DBH: 127.0.0.1, SRV: arboreal.life
       TLS Connection: Connection uses TLS 1.3
       TLS Connection: Probably Okay
       Server Info: Apache
       PHP Version: 7.4.16
       PHP Post Max Size: 256 MB
       PHP Time Limit: 120
       PHP Max Input Vars: 3000
       PHP Max Upload Size: 256 MB
       cURL Version: 7.66.0, OpenSSL/1.1.1k-fips
       SUHOSIN Installed: –
       MySQL Version: 5.7.32
       Default Timezone is UTC: ✔
       fsockopen/cURL: ✔
       SoapClient: ✔
       DOMDocument: ✔
       gzip: ✔
       GD Graphics Library: ✔
       Multibyte String: ✔
       Remote Post: ✔
       Remote Get: ✔
   
       ### GiveWP Configuration ###
   
       GiveWP Version: 2.10.1
       GiveWP Cache: Enabled
       Database Updates: All DB Updates Completed.
       Database Updates: All Database Migrations Completed.
       Database Tables: ✔ xzhlb_give_donors✔ xzhlb_give_donormeta❌ xzhlb_give_comments❌ xzhlb_give_commentmeta❌ xzhlb_give_sessions❌ xzhlb_give_formmeta❌ xzhlb_give_sequential_ordering❌ xzhlb_give_donationmeta✔ xzhlb_give_revenue
       GiveWP Cache: Enabled
       GiveWP Cache: ✔New Donation✔Donation Receipt❌New Offline Donation❌Offline Donation Instructions✔New User Registration✔User Registration Information✔Donation Note✔Email access
       Upgraded From: 2.10.1
       Test Mode: Disabled
       Currency Code: EUR
       Currency Position: Before
       Decimal Separator: .
       Thousands Separator: ,
       Success Page: https://arboreal.life/restore-thankyou/
       Failure Page: https://arboreal.life/restauracion-error/
       Donation History Page: https://arboreal.life/restoration-history/
       GiveWP Forms Slug: /donations/
       Enabled Payment Gateways: Stripe - Credit Card
       Default Payment Gateway: Stripe - Credit Card
       PayPal IPN Verification: Enabled
       PayPal IPN Notifications: N/A
       Donor Email Access: Enabled
       Stripe Webhook Notifications: 24 February, 2021 00:44
   
       ### Active GiveWP Add-ons ###
   
       ### Other Active Plugins ###
   
       ### Inactive Plugins ###
   
       Anti-Malware Security and Brute-Force Firewall: by Eli Scheetz – 4.19.69
       Checkout Field Editor for WooCommerce: by ThemeHigh – 1.4.6
       Classic Editor: by WordPress Contributors – 1.6
       Coming Soon Page, Maintenance Mode & Landing Pages by SeedProd: by SeedProd – 6.2.0
       Duplicate Page: by mndpsingh287 – 4.4
       Easy HTTPS (SSL) Redirection: by Tips and Tricks HQ – 1.9.1
       Fast Velocity Minify: by Raul Peixoto – 3.1.4
       Fonts Plugin | Google Fonts Typography: by Fonts Plugin – 2.5.6
       Give - Stripe Gateway: by GiveWP – 2.2.14
       Health Check & Troubleshooting: by The WordPress.org community – 1.4.5
       Media Cleaner: by Jordy Meow – 6.1.6
       Query Monitor: by John Blackbourn – 3.6.7
       Rotating Tweets (Twitter widget & shortcode): by Martin Tod – 1.9.10
       SG Optimizer: by SiteGround – 5.7.20
       Smart Logo Showcase Lite: by AccessPress Themes – 1.1.7
       Virtual Robots.txt: by Marios Alexandrou – 1.10
       WebP Converter for Media: by Mateusz Gbiorczyk – 2.4.0
       Widget Options: by Widget Options Team – 3.7.7
       WooCommerce: by Automattic – 5.1.0
       WooCommerce Gateways Country Limiter: by OnTheGoSystems – 1.4
       WooCommerce Stripe Gateway: by WooCommerce – 5.0.0
       WP-Optimize - Clean, Compress, Cache: by David Anderson, Ruhani Rabin, Team Updraft – 3.1.8
       WP Coder: by Wow-Company – 2.5
       WPForms Lite: by WPForms – 1.5.6
       WPForms Multilingual: by OnTheGoSystems – 0.1.2
       WPML CMS Nav: by OnTheGoSystems – 1.5.5
       WPML Media: by OnTheGoSystems – 2.6.4
       WPML Multilingual CMS: by OnTheGoSystems – 4.4.10
       WPML Sticky Links: by OnTheGoSystems – 1.5.4
       WPML String Translation: by OnTheGoSystems – 3.1.8
       WPML Translation Management: by OnTheGoSystems – 2.10.6
       WP Rollback: by Impress.org – 1.7.1
       WP Super Cache: by Automattic – 1.7.2
   
       ### Active MU Plugins ###
   
       Health Check Troubleshooting Mode: by  – 1.7.2
   
       ### Theme ###
   
       Name: Flatsome Child
       Version: 3.0
       Author URL: 
       Child Theme: Yes
       Parent Theme Name: Flatsome
       Parent Theme Version: 3.13.3
       Parent Theme Author URL: http://www.uxthemes.com/
       ```
   
 * Thank you
 *  [Justin Freid](https://wordpress.org/support/users/justinfreid/)
 * (@justinfreid)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-when-setting-template/#post-14266469)
 * I think I have the same issue and opened a thread about it here:
    [https://wordpress.org/support/topic/select-form-template-when-saving-draft-or-publishing/](https://wordpress.org/support/topic/select-form-template-when-saving-draft-or-publishing/)
 *  Thread Starter [Helen](https://wordpress.org/support/users/web09/)
 * (@web09)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-when-setting-template/#post-14267776)
 * Iopened the QueryMonitor plugin on the wordpress and it also showed the following
   error:
 * > Table ‘db9blpbmggpono.xzhlb_give_formmeta’ doesn’t exist
 *  , not sure if it’s related. If so, can it be created?
 *  Plugin Support [Matheus Martins](https://wordpress.org/support/users/matheusfd/)
 * (@matheusfd)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-when-setting-template/#post-14328662)
 * Hello [@web09](https://wordpress.org/support/users/web09/),
 * In this case, something dropped this database table and you need to recreate 
   it. What you can do is uninstall and reinstall the GiveWP plugin.
 * I’d recommend taking a backup of the site that you can confidently restore from.
   Here’s an article we wrote that explains more clearly how to do that: [https://givewp.com/backup-for-faster-troubleshooting/](https://givewp.com/backup-for-faster-troubleshooting/)
 * Please let us know if you have further questions on this or need any additional
   assistance!

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

The topic ‘Fatal error when setting template’ is closed to new replies.

 * ![](https://ps.w.org/give/assets/icon-256x256.jpg?rev=2873287)
 * [GiveWP - Donation Plugin and Fundraising Platform](https://wordpress.org/plugins/give/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/give/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/give/)
 * [Active Topics](https://wordpress.org/support/plugin/give/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/give/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/give/reviews/)

## Tags

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

 * 5 replies
 * 4 participants
 * Last reply from: [Matheus Martins](https://wordpress.org/support/users/matheusfd/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/fatal-error-when-setting-template/#post-14328662)
 * Status: resolved