[SmartCrawl Pro] Fatal error message

Hi Support 

I have a critical error happening with Smart Crawl Pro Version 3.5.1.

The site uses WooCommerce. 
The error notice is below. Can you point in me the right direction for the fix please?

I’ve deactivated the plugin for the time being but let me know if you would like me to activate it.

Kind regards

John Griffiths

ERROR BELOW:

Fatal error: Uncaught ArgumentCountError: Too few arguments to function Smartcrawl_Entity::apply_macros(), 0 passed in /home/customer/www/twistedloom.postlunar.co.uk/public_html/wp-content/plugins/wpmu-dev-seo/includes/deprecated/class-wds-replacement-helper.php on line 41 and at least 1 expected in /home/customer/www/twistedloom.postlunar.co.uk/public_html/wp-content/plugins/wpmu-dev-seo/includes/core/entities/class-wds-entity.php:391 Stack trace: #0 /home/customer/www/twistedloom.postlunar.co.uk/public_html/wp-content/plugins/wpmu-dev-seo/includes/deprecated/class-wds-replacement-helper.php(41): Smartcrawl_Entity::apply_macros() #1 /home/customer/www/twistedloom.postlunar.co.uk/public_html/wp-content/plugins/wpmu-dev-seo/includes/deprecated/class-wds-social-value-helper.php(258): Smartcrawl_Replacement_Helper::replace(”) #2 /home/customer/www/twistedloom.postlunar.co.uk/public_html/wp-content/plugins/wpmu-dev-seo/includes/deprecated/class-wds-social-value-helper.php(76): Smartcrawl_Social_Value_Helper->prepare_value(” in /home/customer/www/twistedloom.postlunar.co.uk/public_html/wp-content/plugins/wpmu-dev-seo/includes/core/entities/class-wds-entity.php on line 391
There has been a critical error on this website.

  • Luis Cárdenas
    • Staff

    Hello John ,

    We hope you’re doing well. Sorry to hear you’re having this issue.

    In order to be able to check this properly, please create a new WP admin account with the contact+delegate@wpmudev.com email and provide the login details. We would also need FTP or hosting access, so in case any critical error happens we would be able to remove it quickly.

    You should send us these credentials through the DIRECT CONTACT FORM you can find under the SUPPORT INFORMATION sidebar. Please find more details regarding the same here: https://wpmudev.com/docs/getting-started/getting-support/#support-tickets-additional-details

    Please do not share those credentials on this thread, only use the form. Thank you.

    Regards,
    Luis.

  • Luis Cárdenas
    • Staff

    Hello John ,

    Thank you for sharing the credentials to allow us to check your site. After doing some investigation I was able to find that this is only happening when “Schema & Structured Data for WP & AMP” plugin is also active with Woo on product pages. I’ve already pinged our Smartcrawl team to look for some more feedback regarding this issue.

    We will reply back to you as soon we have an update. In the meantime, I left all the plugins in the same way you have them before I check.

    Regards,
    Luis

  • Luis Cárdenas
    • Staff

    Hello John ,

    We hope you’re doing well.

    Our Smartcrawl team provided this snippet code in order to fix this issue:

    <?php
    
    add_action( 'plugins_loaded', function() {
    	if ( ! defined( 'SMARTCRAWL_VERSION' ) ) {
    		return; // SmartCrawl is not installed/enabled.
    	}
    	if ( version_compare( SMARTCRAWL_VERSION, '3.5.0', '<' ) ) {
    		return; // This patch is for SmartCrawl 3.5.0+
    	}
    	class Smartcrawl_OpenGraph_Value_Helper  {
    		public function __call( $name, $arguments ) {
    			return '';
    		}
    		private function get_current_entity() {
    			$resolver = Smartcrawl_Endpoint_Resolver::resolve();
    			if ( empty( $resolver ) ) {
    				return null;
    			}
    			return $resolver->get_queried_entity();
    		}
    
    		public function get_title() {
    			$entity = $this->get_current_entity();
    			if ( empty( $entity ) ) {
    				return '';
    			}
    			return apply_filters( 'wds_title', $entity->get_meta_title() );
    		}
    
    		public function get_description() {
    			$entity = $this->get_current_entity();
    			if ( empty( $entity ) ) {
    				return '';
    			}
    			return apply_filters( 'wds_metadesc', $entity->get_meta_description() );
    		}
    	}
    });

    Please install it as a Mu-plugin, you can see how to do this by following this guide: https://wpmudev.com/docs/using-wordpress/installing-wordpress-plugins/#installing-mu-plugins, after installing it you should be able to use Smartcrawl, Woocommerce, and Schema & Structured Data for WP & AMP without getting the critical error.

    An official fix should be released in the next version of Smartcrawl. Please let us know if this works for you.

    Regards,
    Luis.