• Resolved christodeus

    (@christodeus)


    Hi,

    It’s seems that AI Engine is causing this error:

    The register_rest_route function was called incorrectly. The namespace must not start or end with a slash. (This message was added in version 5.4.2.)

    Any idea how to fix this?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jordy Meow

    (@tigroumeow)

    Hi,

    Do you have the exact line for this error? Also, 100% sure it comes from AI Engine?

    Thread Starter christodeus

    (@christodeus)

    Hi,

    Sorry I’m not 100% sure if it’s AI Engine, but I know that it happens when I activate it and use it. I think maybe there is a disfunction with WooCommerce or another plugin, it happens when I activate Embedding only, here is the message from Query Monitor:

    1. register_rest_route()
      wp-includes/rest-api.php:51
    2. MeowPro_MWAI_Embeddings->rest_api_init()
      wp-content/plugins/ai-engine-pro/premium/embeddings.php:51
    3. do_action('rest_api_init')
      wp-includes/plugin.php:517
    4. rest_get_server()
      wp-includes/rest-api.php:587
    5. rest_do_request()
      wp-includes/rest-api.php:545
    6. rest_preload_api_request()
      wp-includes/rest-api.php:2911
    7. array_reduce()
      wp-includes/rest-api.php:2911
    8. Automattic\W\I\A\Settings->add_component_settings()
      wp-content/plugins/woocommerce/src/Internal/Admin/Settings.php:146
    9. apply_filters('woocommerce_admin_shared_settings')
      wp-includes/plugin.php:205
    10. Automattic\W\I\A\WCAdminSharedSettings->Automattic\W\I\A\{closure}()
      wp-content/plugins/woocommerce/src/Internal/Admin/WCAdminSharedSettings.php:61
    11. Automattic\W\B\A\AssetDataRegistry->execute_lazy_data()
      wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php:267
    12. Automattic\W\B\A\AssetDataRegistry->enqueue_asset_data()
      wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/Assets/AssetDataRegistry.php:368
    13. do_action('admin_print_footer_scripts')
      wp-includes/plugin.php:517

    • This reply was modified 2 years, 7 months ago by christodeus.
    Thread Starter christodeus

    (@christodeus)

    Hi, It seems that it was Jetpack that was causing a problem, now I don’t have anymore error message

    Thread Starter christodeus

    (@christodeus)

    Hi, I talked to fast, the problem is still there:

    1. register_rest_route()
      wp-includes/rest-api.php:51
    2. MeowPro_MWAI_Embeddings->rest_api_init()
      wp-content/plugins/ai-engine-pro/premium/embeddings.php:51
    3. do_action('rest_api_init')
      wp-includes/plugin.php:517
    4. rest_get_server()
      wp-includes/rest-api.php:587
    5. rest_do_request()
      wp-includes/rest-api.php:545
    6. rest_preload_api_request()
      wp-includes/rest-api.php:2911
    7. array_reduce()
      wp-includes/rest-api.php:2911
    8. Google\S\C\A\Assets->Google\S\C\A\{closure}()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:398
    9. Google\S\C\A\Script_Data->Google\S\C\A\{closure}()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Script_Data.php:51
    10. Google\S\C\A\Asset->before_print()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Asset.php:129
    11. Google\S\C\A\Assets->run_before_print_callbacks()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:1018
    12. Google\S\C\A\Assets->run_before_print_callbacks()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:1027
    13. Google\S\C\A\Assets->run_before_print_callbacks()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:1027
    14. Google\S\C\A\Assets->run_before_print_callbacks()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:1027
    15. Google\S\C\A\Assets->Google\S\C\A\{closure}()
      wp-content/plugins/google-site-kit/includes/Core/Assets/Assets.php:157
    16. do_action('wp_print_scripts')
      wp-includes/plugin.php:517
    17. wp_print_head_scripts()
      wp-includes/script-loader.php:2177
    18. do_action('wp_head')
      wp-includes/plugin.php:517
    19. wp_head()
      wp-includes/general-template.php:3053
    20. load_template('wp-content/themes/my-listing/header.php')
      wp-includes/template.php:785
    21. locate_template()
      wp-includes/template.php:720
    22. get_header()
      wp-includes/general-template.php:48
    Thread Starter christodeus

    (@christodeus)

    OK, so it was definitetly Google Site Kit which caused the errors. I have disabled it and now it works just fine. But so you know πŸ™‚

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

The topic ‘Function register_rest_route problem’ is closed to new replies.