• Resolved marafa86

    (@marafa86)


    Dear,

    I have a problem in website

    (Fatal error: Uncaught Rubix\ML\Exceptions\RuntimeException: Estimator has not been trained. in /public_html/wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/src/Classifiers/KNearestNeighbors.php:208 Stack trace: #0 /public_html/wp-content/plugins/no-unsafe-inline/src/Nunil_Manipulate_DOM.php(985): Rubix\ML\Classifiers\KNearestNeighbors->predict() #1 /public_html/wp-content/plugins/no-unsafe-inline/src/Nunil_Manipulate_DOM.php(416): NUNIL\Nunil_Manipulate_DOM->check_cluster_whitelist() #2 /public_html/wp-content/plugins/no-unsafe-inline/src/Nunil_Manipulate_DOM.php(302): NUNIL\Nunil_Manipulate_DOM->allow_inline() #3 /public_html/wp-content/plugins/no-unsafe-inline/src/Nunil_Manipulate_DOM.php(273): NUNIL\Nunil_Manipulate_DOM->manipulate_inline_scripts() #4 /public_html/wp-content/plugins/no-unsafe-inline/public/class-no-unsafe-inline-public.php(201): NUNIL\Nunil_Manipulate_DOM->get_local_csp() #5 /public_html/wp-includes/class-wp-hook.php(324): No_Unsafe_Inline_Public->filter_final_output() #6 /public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #7 /public_html/wp-content/mu-plugins/no-unsafe-inline-output-buffering.php(46): apply_filters() #8 /public_html/wp-includes/class-wp-hook.php(324): {closure}() #9 /public_html/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters() #10 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #11 /public_html/wp-includes/load.php(1280): do_action() #12 [internal function]: shutdown_action_hook() #13 {main} thrown in /public_html/wp-content/plugins/no-unsafe-inline/vendor/rubix/ml/src/Classifiers/KNearestNeighbors.php on line 208)

    and when deactivate plugin website work good. can you support me ?

    The page I need help with: [log in to see the link]

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

    (@mociofiletto)

    Please, explain the steps you have done when this issue appears and check if the upload dir is writable.

    Thread Starter marafa86

    (@marafa86)

    When I update PHP from 7.4 to 8.2 this error appeared, now I downgrade php from 8.2 to 8 , Working fine.

    Plugin Author Giuseppe

    (@mociofiletto)

    Thanks for your answer @marafa86.

    The plugin is tested with PHP8.2 (even if the tests don’t cover the 100% of the code).

    I think that you miss a PHP extension needed whit PHP 8.2; if your hosting provider uses cpanel, you can easily check this.

    Here you can see all extensions needed by the plugin, and you can see that with PHP 8.2 the random extension is needed (and this extensions is not needed with PHP 7.4 and 8.0):

    https://github.com/MocioF/No-unsafe-inline/blob/cf346e6fa7ea5fa929e77366e246600026e54a30/includes/class-no-unsafe-inline-activator.php#L308-L345

    Please, let me know if enabling random (and all the other extensions listed in the code), the issue is solved.

    Thread Starter marafa86

    (@marafa86)

    Update to 8.2 and add PHP extension and website worked fine .

    Than you very much

    • This reply was modified 2 months ago by marafa86.

    Hello, i have a similar issue, I activated the plugin, then enabled CSP protection, and my site went down immediately displaying error. I had PHP 8.3, i then downgrade it to 8.2 just to see if it would come back, but still can’t access WP backed or anything anymore, Please help

    Fatal error: Uncaught Rubix\ML\Exceptions\RuntimeException: Estimator has not been trained. in /home

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.