• Resolved Mujahid Ms

    (@emjaygadgets)


    Hello,

    Advanced Woo Search is so far the most advanced and accurate search plugin I have seen. Normally, I can never switch to any other, but I had to now.

    The plugin creates a critical error whenever a non-admin role (such as “Author”) tries to create a new post. But admins can post just fine.

    The moment an author clicks on “Create new post” using default WordPress editor, the window just returns “critical error has occurred on this site” and we receive instant notification from WordPress core that it was caused by advanced woo search.

    When we deactivate the plugin, the author can create posts just fine.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author ILLID

    (@mihail-barinov)

    Hi,

    I was trying to reproduce this issue but failed.

    Please tell me – what is the exact text of this critical error? Perhaps you need to enable site debug mode as described in this article to view all error messages.

    Regards

    Thread Starter Mujahid Ms

    (@emjaygadgets)

    Thanks for responding. The error message says

    “There has been a critical error on this website. Please check your site admin email inbox for instructions. Learn more about troubleshooting WordPress.

    Then an email comes in from wordpress core expressing the cause, which is advanced woo search. Upon deactivating, author can post

    Plugin Author ILLID

    (@mihail-barinov)

    Perhaps if you can enable that debug mode that I mentioned earlier this will help to get more details about this problem and find a way to solve it.

    Also – please tell me what theme you are currently using and what PHP version is installed on your server? Will be also very useful if you give me a list of currently installed plugins on your site.

    Regards

    Thread Starter Mujahid Ms

    (@emjaygadgets)

    Hello ILLID,

    Thanks for the prompt replies. Below is the error from the debugging I enabled

    Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /home/u478494005/domains/eglafrica.com/public_html/wp-content/plugins/advanced-woo-search/includes/modules/gutenberg/class-aws-gutenberg-init.php:116 Stack trace: #0 /home/u478494005/domains/eglafrica.com/public_html/wp-content/plugins/advanced-woo-search/includes/modules/gutenberg/class-aws-gutenberg-init.php(116): array_merge() #1 /home/u478494005/domains/eglafrica.com/public_html/wp-includes/class-wp-hook.php(310): AWS_Gutenberg_Init->add_block_category() #2 /home/u478494005/domains/eglafrica.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #3 /home/u478494005/domains/eglafrica.com/public_html/wp-includes/block-editor.php(85): apply_filters() #4 /home/u478494005/domains/eglafrica.com/public_html/wp-admin/edit-form-blocks.php(81): get_block_categories() #5 /home/u478494005/domains/eglafrica.com/public_html/wp-admin/post-new.php(72): require(‘/home/u47849400…’) #6 {main} thrown in /home/u478494005/domains/eglafrica.com/public_html/wp-content/plugins/advanced-woo-search/includes/modules/gutenberg/class-aws-gutenberg-init.php on line 116

    There has been a critical error on your website. Please check your site admin email inbox for instructions.

    Below are the additional information you requested
    Theme: Flatsome

    Php Version: 8.0.28

    I am sorry disclosing all the plugins installed here feels like compromising security. Can you provide an email for me to forward the list to you? If you recommend it is safe here, I will share the list. Thank you

    • This reply was modified 1 year, 8 months ago by Mujahid Ms.
    • This reply was modified 1 year, 8 months ago by Mujahid Ms.
    Plugin Author ILLID

    (@mihail-barinov)

    Looks like I understand what can cause this issue. I will fix this in the next plugin release.

    For now you can fix it by yourself by adding plugin source files. Please open wp-content/plugins/advanced-woo-search/includes/modules/gutenberg/class-aws-gutenberg-init.php, find lines

       public function add_block_category( $categories ) {
                return array_merge(
                    $categories,
                    array(
                        array(
                            'slug'  => 'aws',
                            'title' => 'Advanced Woo Search',
                            'icon'  => 'search',
                        ),
                    )
                );
            }

    And replace it with

    public function add_block_category( $categories ) {
                if ( is_array( $categories ) ) {
                    $categories = array_merge(
                        $categories,
                        array(
                            array(
                                'slug'  => 'aws',
                                'title' => 'Advanced Woo Search',
                                'icon'  => 'search',
                            ),
                        )
                    );
                }
                return $categories;
            }
    Thread Starter Mujahid Ms

    (@emjaygadgets)

    It works now. Thank you so much. You are the best author I know in this community

    Plugin Author ILLID

    (@mihail-barinov)

    Glad to help and thanks for your kind words.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Conflict with default WordPress post editor: Creates critical error’ is closed to new replies.