Resolved
Resolved in: 4.5.0
Overview of the issue
In some scenarios, when you try to register your WPML license, you see the following error:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to OTGS\Installer\Collection::of() must be of the type array, null given, called in ...\wp-content\plugins\sitepress-multilingual-cms\vendor\otgs\installer\includes\class-wp-installer.php on line 1255 and defined in ...\wp-content\plugins\sitepress-multilingual-cms\vendor\otgs\installer\includes\utilities\Collection.php:20
Or this other slightly variation:
PHP Fatal error: Uncaught TypeError: Argument 1 passed to OTGS\Installer\Collection::of() must be of the type array, bool given, called in .../wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/notices/Recommendation.php on line 37 and defined in .../wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/utilities/Collection.php:20
Workaround
Our developers are working on it, however you can use the following workaround:
- Make a full backup of your site.
- Access your database.
- Open the wp_options table.
- Remove the wp_installer_settings key from the table.
- If the issue is still not fixed then also delete otgs_installer_recommendations_admin_notices key from the same table.
For the second error variation (the one with the bool type), you should follow the previous procedure as well, but remove only the otgs_installer_recommendations_admin_notices key.
Hello,
we have developed the website on https://www.new.alorem.fr
We now want to publish it on https://www.alorem.fr
For that we have :
1) changed all variables in the database from new.alorem.fr to alorem.fr
2) transferred the site from new.alorem.fr to alorem.fr
3) we have this error :
Fatal error: Uncaught TypeError: Argument 1 passed to OTGS\Installer\Collection::of() must be of the type array, string given, called in /home/alorem/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/notices/Recommendation.php on line 37 and defined in /home/alorem/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/utilities/Collection.php:20 Stack trace: #0 /home/alorem/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/admin-notices/notices/Recommendation.php(37): OTGS\Installer\Collection::of(”) #1 [internal function]: OTGS\Installer\AdminNotices\Notices\Recommendation::getCurrentNotices(‘OTGS\\Installer\\…’, Array) #2 /home/alorem/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/utilities/FP/functions.php(18): call_user_func_array(‘OTGS\\Installer\\…’, Array) #3 /home/alorem/public_html/wp-includes/class-wp-hook.php(303): OTGS\Installer\FP\{closur in /home/alorem/public_html/wp-content/plugins/sitepress-multilingual-cms/vendor/otgs/installer/includes/utilities/Collection.php on line 20
4) we deleted the keys in the database as you said the website :
Make a full backup of your site.
Access your database.
Open the wp_options table.
Remove the wp_installer_settings key from the table.
If the issue is still not fixed then also delete otgs_installer_recommendations_admin_notices key from the same table.
But even with these changes, the error is still present. So we put the old site back online at https://www.alorem.fr to avoid losing customers while waiting for your answer.
Do you have a solution to solve this problem or temporarily deactivate the module to be able to access the site then reactivate it via the administration.
Sincerely, Pierre
Hello Pierre,
Even if the error is related to the same Uncaught TypeError, it is slightly different from both cases presented here.
Could you please open a ticket in our support forum so we can investigate it better?
Thank you for your help.
It doesn’t work for me either. Is there any other solution please?
Thank you very much for your help
Hello there,
If this workaround does not work in your case, don’t hesitate to open a ticket in our support forum so we can investigate it better.
Regards
Thanks this workarround fix my issue
We are glad to know that it worked for you.