• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Resolved WP Toolkit setup new password for admin haystack (language) error

gmu-jerdj

New Pleskian
Server operating system version
Plesk Obsidian Web Host Edition
Plesk version and microupdate number
18.0.44 #3
Hi,
For my company we are running a Plesk enviroment (Plesk Obsidian Web Host Edition, Version 18.0.44 Update #3) with a WP Toolkit Module/Extension (Version 6.2.13-7771)
The developer that set up the Plesk enviroment no longer works with us so there's no going to him with this issue we're experiencing and most of our other developers are not too familiar with Plesk, we know our way around but with an issue such as this we're not able to pinpoint where things go wrong. We've been through files and database to edit #language# to 'en_US' but to no avail. Also searching for this issue with 'was not found in haystack' or 'wp toolkit setup error', etc. did not deliver any usable answers. Therefor I now turn to this forum via this post.

For one of the website, which we made by doing a WordPress installation with WP Toolkit, we're running into an issue while login in. The password is unknown and thus the Setup was used to create a new password for the known admin. This is where the error occurs. We get '#language#' was not found in the haystack where #language# is one of the languages (not en_US) setup in WordPress on the website. With the network analyzer we are able to read out the request that is called when Setup is initiated and also the request that is made when the form is submitted.

Request Setup initiated (GET, target filename: /modules/wp-toolkit/index.php/v1/installations/60/account) response (JSON):
JSON:
{
    "loginUrl":"#redacted-url#/wp-login.php",
    "currentLogin":null,
    "currentPassword":null,
    "currentEmail":"#redacted-email-adress#",
    "currentLanguage":"#language#",
    "availableLogins":[{
        "login":"#redacted-username#",
        "title":"admin"
    }],
    "availableLanguages":[{
        "code":"en_US",
        "title":"English (United States)"
    }]
}

Request form submit (PATCH, target filename: /modules/wp-toolkit/index.php/v1/installations/60/account) response (JSON):
JSON:
{
    "meta":{
        "status":422,"
        message":"Unexpected result of validation"
    },
    "formErrors":{"language":{"notInArray":"'#language#' was not found in the haystack"}}
}

My best guess is that the way WP Toolkit Setup works became incompatible with the version of WordPress installed. Current version of WordPress on the website is: 6.4.2, and PHP version: 8.0.20. Plugins and themes have been updated as well.
If any other information is needed feel free to ask.
 
Miraculously the problem now seems to be resolved. The available languages in the JSON of the GET request are now filled with all available languages again.
 
Back
Top