• Resolved Jette Droger

    (@droeger)


    Hi,
    I’m trying to use the ai tranlator for Loco Translate, but my site keeps crashing when I activate

    I get this error:

    Fatal error: Uncaught Error: Class “WordPress\AiClient\Providers\ApiBasedImplementation\ListModelsApiBasedProviderAvailability” not found in /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-content/plugins/automatic-translator-addon-for-loco-translate/includes/wp-ai-providers/vendor/wordpress/ai-provider-for-openai/src/Provider/OpenAiProvider.php:104 Stack trace: #0 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-includes/php-ai-client/src/Providers/AbstractProvider.php(69): WordPress\OpenAiAiProvider\Provider\OpenAiProvider::createProviderAvailability() #1 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-includes/php-ai-client/src/Providers/ProviderRegistry.php(359): WordPress\AiClient\Providers\AbstractProvider::availability() #2 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-includes/php-ai-client/src/Providers/ProviderRegistry.php(94): WordPress\AiClient\Providers\ProviderRegistry->setHttpTransporterForProvider(‘WordPress\\OpenA…’, Object(WordPress\AiClient\Providers\Http\HttpTransporter)) #3 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-content/plugins/automatic-translator-addon-for-loco-translate/automatic-translator-addon-for-loco-translate.php(1236): WordPress\AiClient\Providers\ProviderRegistry->registerProvider(‘WordPress\\OpenA…’) #4 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-includes/class-wp-hook.php(341): LocoAutoTranslateAddon->atlt_register_ai_client(”) #5 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #6 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #7 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-settings.php(771): do_action(‘init’) #8 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-config.php(103): require_once(‘/var/www/danske…’) #9 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-load.php(50): require_once(‘/var/www/danske…’) #10 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-admin/admin.php(35): require_once(‘/var/www/danske…’) #11 /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-admin/index.php(10): require_once(‘/var/www/danske…’) #12 {main} thrown in /var/www/danskesoloselvstaendige.dk/public_html/medlem/wp-content/plugins/automatic-translator-addon-for-loco-translate/includes/wp-ai-providers/vendor/wordpress/ai-provider-for-openai/src/Provider/OpenAiProvider.php on line 104

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Vishali Tayal

    (@vishali009)

    Hi @droeger ,

    Thank you for reporting this issue and for sharing the error details.

    I have encountered a very similar problem before on a staging server. In that case, the issue was related to a missing or incorrectly named file in the WordPress AI Client package provided by the hosting environment.

    The expected file should be:

    wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/ListModelsApiBasedProviderAvailability.php

    However, on the affected environment, the file was created as:

    wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/ListModelsApiBasedProviderA.php

    This filename mismatch caused the ListModelsApiBasedProviderAvailability class to be unavailable, resulting in a fatal error very similar to the one you’re experiencing. The issue was eventually resolved on the server side by the hosting provider.

    Could you please check the following directory on your site and let me know which file is present?

    wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/

    Specifically, please confirm whether you see:

    • ListModelsApiBasedProviderAvailability.php (expected)
    • or ListModelsApiBasedProviderA.php (truncated/incorrect)

    Once you confirm this, I’ll be able to determine whether the same underlying issue is affecting your site and advise on the appropriate next steps.

    Looking forward to your reply.

    Thread Starter Jette Droger

    (@droeger)

    Hi @vishali009

    Thank you for your quick reply.

    I chose the easy way out. You wrote that there might be a file or two missing form WordPress, so instead of looking for them, I reinstalled WordPress and now it works. It was a brand new installation and my webhost has obviously made some ajustments to WordPress eventhough I installed a “core-version” of WordPress.

    Thanks for leading me in the right direction.

    Plugin Support Vishali Tayal

    (@vishali009)

    Hi @droeger

    Thank you for the update. I’m glad to hear that reinstalling WordPress resolved the issue and that everything is working correctly now.

    If you were satisfied with the support you received, I would greatly appreciate it if you could take a moment to leave a review about your support experience here:

    https://wordpress.org/support/plugin/automatic-translator-addon-for-loco-translate/reviews/

    Your feedback helps us improve our support and assists other users when choosing the plugin.

    Thank you for your support, and please feel free to reach out if you need any assistance in the future.

    Thanks & Regards,
    Vishali Tayal

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

You must be logged in to reply to this topic.