• Resolved kinsey95

    (@kinsey95)


    Hey I’m getting an error on the configuration page.
    WooCommerce for logged-in users
    Something went wrong. It wasn’t possible to load the settings.
    can you please help me to solve this

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Ramon Ahnert

    (@rahmohn)

    Hi @kinsey95

    Could you check if there is some error in the console of the browser (Developer tools)?

    Other than that, is the WP REST API enabled on your site? You can check it by accessing the URL: yourdomain.com/wp-json.

    Thread Starter kinsey95

    (@kinsey95)

    Thank you for your reply.
    Yes I’m having the following errors.
    1. Mixed Content: The page at ‘https://staging-vksgroup-arsnew.kinsta.cloud/wp-admin/admin.php?page=woocommerce_for_logged_users’ was loaded over HTTPS, but requested an insecure stylesheet ‘http://staging-vksgroup-arsnew.kinsta.cloud/wp-content/plugins/subaccounts-for-woocommerce/assets/css/admin.css?ver=6.0.2’. This request has been blocked; the content must be served over HTTPS.

    2. Failed to load resource: the server responded with a status of 500 () /wp-json/wp/v2/pages?per_page=5:1

    Plugin Author Ramon Ahnert

    (@rahmohn)

    @kinsey95

    The error is happening when the plugin tries to retrieve the pages in the endpoint /wp-json/wp/v2/pages?per_page=5 (WP API REST) and since it is returning an error 500 it means that the error is happening on the server side. That way, you need to look at the server logs to get more information about the error. Once you do that, paste the log here.

    This article can give you some guidance: https://wordpress.org/support/article/debugging-in-wordpress/

    Other than that, make sure you can access directly in the browser YOURDOMAIN.com/wp-json/wp/v2/pages?per_page=5

    • This reply was modified 1 year, 7 months ago by Ramon Ahnert.
    • This reply was modified 1 year, 7 months ago by Ramon Ahnert.
    Thread Starter kinsey95

    (@kinsey95)

    Here’s my error log.

    2022/10/17 05:22:21 [error] 31309#31309: *458 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to a member function get() on null in /www/*********/public/wp-content/themes/Divi/includes/builder/feature/woocommerce-modules.php:1095
    Stack trace:
    #0 /www/*********/public/wp-content/themes/Divi/includes/builder/module/woocommerce/CartNotice.php(1011): et_builder_wc_render_module_template('woocommerce_out...', Array)
    #1 /www/*********/public/wp-content/themes/Divi/includes/builder/module/woocommerce/CartNotice.php(1158): ET_Builder_Module_Woocommerce_Cart_Notice::get_cart_notice(Array)
    #2 /www/*********/public/wp-content/themes/Divi/includes/builder/class-et-builder-element.php(3331): ET_Builder_Module_Woocommerce_Cart_Notice->render(Array, '', 'et_pb_wc_cart_n...', '', '', '', '', '')
    #3 /www/*********/public/wp-includes/shortcodes.php(356): ET_Builder_Element->_render(Array, '', 'et_pb_wc_cart_n...')
    #4 [internal function]: do_shortcode_tag(Array)
    #5 /www/*********/public/wp-includes/shortcodes.php(228): preg_replace_callba" while reading response header from upstream, client: 27.58.188.146, server: staging-vksgroup-arsnew.kinsta.cloud, request: "GET /wp-json/wp/v2/pages?per_page=5 HTTP/1.1", upstream: "fastcgi://unix:/var/run/php7.4-fpm-vksgroup.sock:", host: "staging-vksgroup-arsnew.kinsta.cloud:56668"
    Plugin Author Ramon Ahnert

    (@rahmohn)

    @kinsey95

    Based on the log, it seems that the issue could be caused by Divi. However, it’s hard to say without debugging properly. You can disable Divi to check if the configuration page works.

    Also, you can set up the redirect page URL using the filter wflu_redirect_page_url by adding the code snippet below to the functions.php file of your theme:

    add_filter(
    	'wflu_redirect_page_url',
    	function() {
    		return 'http://YOURURL.com/';
    	}
    );
    
    Thread Starter kinsey95

    (@kinsey95)

    Hey,
    Thank you for sharing the code snippet, but unfortunately, it is not working properly at my end. After adding this code when I try to access my woocommerce page than it is giving me an error of page isn’t working.

    Plugin Author Ramon Ahnert

    (@rahmohn)

    @kinsey95

    What URL you’re using in the code snippet?

    Thread Starter kinsey95

    (@kinsey95)

    Hey, This is my code.

    add_filter(
    	'wflu_redirect_page_url',
    	function() {
    		return 'https://staging-vksgroup-arsnew.kinsta.cloud/products/';
    	}
    );

    and the products page is my default shop page for woocommerce.

    Plugin Author Ramon Ahnert

    (@rahmohn)

    @kinsey95

    The URL shouldn’t be the shop/cart/checkout page otherwise it will redirect in an infinite loop.

    The plugin prevents that not logged-in users access the shop page and redirects to the “My Account” page by default to log in. This code snippet allows you to change this default page but you can’t redirect to the shop/cart/checkout page.

    Thread Starter kinsey95

    (@kinsey95)

    Hey, Thanks for your help.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Giving error on a configuration page’ is closed to new replies.