Appearance – customise – ERROR
-
Hi,
when I click on Customise in Appearance it show this error. How do I solve this?
Please help!Regards!
The page I need help with: [log in to see the link]
-
Hello @prash18
?Thank you for reaching out to support! This looks like there might be something going on with the theme conflicting with something in the nav-menu.php. Looking at that function on estimates_admin.php, it’s looking for a post states not to be null. In my testing with multiple themes, that value is passed correctly. Can you provide some more information about what theme you are using and the version of PHP? Also, are you trying to do something with states in you’re functions.php file as well?
Thanks
Elana D.Theme : FtagEmentor (WP Film Studio – WordPress Movie Maker/Production) by HasThemes
PHP version: 7.3.6
Yes, I have included custom code provided by SI to add Indian States using Code Snippets./**
* This function file is loaded after the parent theme’s function file. It’s a great way to override functions, e.g. add_image_size sizes.
*
*
*/
function custom_states() {
return array(
‘India’ => array(
‘AP’ => ‘Andhra Pradesh’,
‘AR’ => ‘Arunachal Pradesh’,
‘AS’ => ‘Assam’,
‘BR’ => ‘Bihar’,
‘CG’ => ‘Chhattisgarh’,
‘GA’ => ‘Goa’,
‘GJ’ => ‘Gujarat’,
‘HR’ => ‘Haryana’,
‘HP’ => ‘Himachal Pradesh’,
‘JK’ => ‘Jammu and Kashmir’,
‘JH’ => ‘Jharkhand’,
‘KA’ => ‘Karnataka’,
‘KL’ => ‘Kerala’,
‘MP’ => ‘Madhya Pradesh’,
‘MH’ => ‘Maharashtra’,
‘MN’ => ‘Manipur’,
‘ML’ => ‘Meghalaya’,
‘MZ’ => ‘Mizoram’,
‘NL’ => ‘Nagaland’,
‘OR’ => ‘Orissa’,
‘PB’ => ‘Punjab’,
‘RJ’ => ‘Rajasthan’,
‘SK’ => ‘Sikkim’,
‘TN’ => ‘Tamil Nadu’,
‘TR’ => ‘Tripura’,
‘UK’ => ‘Uttarakhand’,
‘UP’ => ‘Uttar Pradesh’,
‘WB’ => ‘West Bengal’,
‘AN’ => ‘Andaman and Nicobar Islands’,
‘CH’ => ‘Chandigarh’,
‘DH’ => ‘Dadra and Nagar Haveli’,
‘DD’ => ‘Daman and Diu’,
‘DL’ => ‘Delhi’,
‘LD’ => ‘Lakshadweep’,
‘PY’ => ‘Pondicherry’,)
);
}
add_filter(‘sprout_state_options’, ‘custom_states’);-
This reply was modified 4 years, 5 months ago by
Prashant.
Hello @prash18
You need to make sure you add the country as well. Please add the below to your functions.php and should work.
function custom_country() {
return array(
‘MX’ => ‘India’,
);
}
add_filter(‘sprout_country_options’, ‘custom_country’);I did what you said but its still showing the same error.
I really liked the plugin but now its not allowing me to use.
And I received this email from WordPress…
Since WordPress 5.2 there is a built-in feature that detects when a plugin or theme causes a fatal error on your site, and notifies you with this automated email.
In this case, WordPress caught an error with one of your plugins, Sprout Invoices.
——————–When seeking help with this issue, you may be asked for some of the following information:
WordPress version 5.5.1
Current theme: FtagEmentor – Child (version 1.0.0)
Current plugin: Sprout Invoices (version 19.9.2)
PHP version 7.4.9Error Details
=============
An error of type E_ERROR was caused in line 286 of the file /home/h7cc1beh25ov/public_html/wp-content/plugins/sprout-invoices/controllers/estimates/Estimates_Admin.php. Error message: Uncaught TypeError: Argument 2 passed to SI_Estimates_Admin::filter_post_states() must be an instance of WP_Post, null given, called in /home/h7cc1beh25ov/public_html/wp-includes/class-wp-hook.php on line 287 and defined in /home/h7cc1beh25ov/public_html/wp-content/plugins/sprout-invoices/controllers/estimates/Estimates_Admin.php:286
Stack trace:
#0 /home/h7cc1beh25ov/public_html/wp-includes/class-wp-hook.php(287): SI_Estimates_Admin::filter_post_states(Array, NULL)
#1 /home/h7cc1beh25ov/public_html/wp-includes/plugin.php(206): WP_Hook->apply_filters(Array, Array)
#2 /home/h7cc1beh25ov/public_html/wp-admin/includes/template.php(2224): apply_filters(‘display_post_st…’, Array, NULL)
#3 /home/h7cc1beh25ov/public_html/wp-includes/nav-menu.php(822): get_post_states(NULL)
#4 [internal function]: wp_setup_nav_menu_item(Object(WP_Post))
#5 /home/h7cc1beh25ov/public_html/wp-includes/nav-menu.php(748): array_map(‘wp_setup_nav_me…’, Array)
#6 /home/h7cc1beh25ov/public_html/wp-includes/class-wp-customize-nav-menus.phHello @prash18
Sometimes strange behavior may be caused by a plugin or theme conflict. We suggest doing a conflict check to see if we can find out what is causing the issue.
We understand if you wouldn’t want to deactivate your plugins and switch themes on a production site, so it may be preferable that you set up a staging environment for your tests. Some popular web hosts offer quick setups for a staging site, so please contact your web host for assistance.
Can you please inform me of the results?
Hello,
We haven’t seen a reply to our last update in over a week, so we will mark this thread as resolved. Of course, if you have further questions, do not hesitate to reopen a topic, and we will continue from there!
Thanks
Elana D.hi,
I tried changing the theme on staging site as well but still its not of any use. I am still getting error and its not letting me use Appearance > Theme > customize option now.Plz suggest.
Regards!
-
This reply was modified 4 years, 1 month ago by
Prashant.
-
This reply was modified 4 years, 5 months ago by
- The topic ‘Appearance – customise – ERROR’ is closed to new replies.