Home › Toolset Professional Support › [Resolved] InjectionException after website (and plugin) upgrade
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
This topic contains 9 replies, has 2 voices.
Last updated by Christopher Amirian 5 days, 4 hours ago.
Assisted by: Christopher Amirian.
Hi,
After the upgrade of the customer website, we receive errors on creating/updating pages
Can you tell me what we need to change?
Foutdetails
===========
Een fout van het type E_ERROR werd veroorzaakt op regelnummer 422 van het bestand ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php. Foutmelding: Uncaught ReflectionException: Class "OTGS\Toolset\Types\Compatibility\Yoast\Field\Factory" does not exist in ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/StandardReflector.php:29
Stack trace:
#0 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/StandardReflector.php(29): ReflectionClass->__construct('...')
#1 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/CachingReflector.php(73): OTGS\Toolset\Common\Auryn\StandardReflector->getParamTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#2 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(527): OTGS\Toolset\Common\Auryn\CachingReflector->getParamTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#3 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(474): OTGS\Toolset\Common\Auryn\Injector->buildArgFromTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#4 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(414): OTGS\Toolset\Common\Auryn\Injector->provisionFuncArgs(Object(ReflectionMethod), Array, Array, '...')
#5 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(373): OTGS\Toolset\Common\Auryn\Injector->provisionInstance('...', '...', Array)
#6 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(542): OTGS\Toolset\Common\Auryn\Injector->make('...')
#7 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(474): OTGS\Toolset\Common\Auryn\Injector->buildArgFromTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#8 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(639): OTGS\Toolset\Common\Auryn\Injector->provisionFuncArgs(Object(ReflectionMethod), Array, Array, '...')
#9 ../wp-content/plugins/types/application/bootstrap.php(115): OTGS\Toolset\Common\Auryn\Injector->execute(Array)
#10 ../wp-includes/class-wp-hook.php(324): {closure}('')
#11 ../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#12 ../wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#13 ../wp-admin/admin.php(385): do_action('...')
#14 ../wp-admin/post.php(12): require_once('...')
#15 {main}
Next OTGS\Toolset\Common\Auryn\InjectionException: Could not make OTGS\Toolset\Types\Compatibility\Yoast\Field\Repository: Class "OTGS\Toolset\Types\Compatibility\Yoast\Field\Factory" does not exist in ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php:422
Stack trace:
#0 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(373): OTGS\Toolset\Common\Auryn\Injector->provisionInstance('...', '...', Array)
#1 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(542): OTGS\Toolset\Common\Auryn\Injector->make('...')
#2 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(474): OTGS\Toolset\Common\Auryn\Injector->buildArgFromTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#3 ../wp-content/plugins/types/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(639): OTGS\Toolset\Common\Auryn\Injector->provisionFuncArgs(Object(ReflectionMethod), Array, Array, '...')
#4 ../wp-content/plugins/types/application/bootstrap.php(115): OTGS\Toolset\Common\Auryn\Injector->execute(Array)
#5 ../wp-includes/class-wp-hook.php(324): {closure}('')
#6 ../wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#7 ../wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#8 ../wp-admin/admin.php(385): do_action('...')
#9 ../wp-admin/post.php(12): require_once('...')
#10 {main}
thrown
Hi,
It seems that the issue is happening due to a wrong installation.
Please delete the files of the Toolset Types plugin and install it manually:
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Make sure you are signed in toolset.com
- Go to https://toolset.com/account/downloads/
- Click the "Download Toolset manually" link to show the rest of the plugins on the page.
- Download the latest version of the Toolset Types and its add-ons.
- Install them manually on your website.
Thanks.
Hi, I did a manual reinstall as mentioned above, but no success... the error remains.
Hi,
I'd appreciate it if you could create a copy of the website and provide the login information by setting the next reply as private.
that way we will be able to troubleshoot without the fear of breaking a live website.
Thanks.
Hi,
Thank you for the login information.
Here is what I have done:
- Activated the default 2022 theme.
- Deactivated all the plugins except Toolset Types and Toolset Blocks.
- Went to "Vacatures" with the title of "Ervaren monteur CV/Sanitair (nieuwe installaties)"
- Changed the content by adding a few ! on the first title.
- Saved the post.
- Everything worked correctly.
I'd appreciate it if you could give the steps to see the exception error as detailed as above.
Thanks.
Hi Christopher,
Thanks for your testing today!
I was updating the staging environment as much as possible to represent the prod environment again.
- Changed the theme again
- Activated most needed plugins
After that, I retested myself, on the staging environment and i think I found a link.
When I disable the Yoast plugin, all works fine, I can edit things.
When I enable the Yoast plugin, all types like "Projecten", "Vacatures" and "Testimonials" go into error when I try to edit
It looks like the error occurs in the Toolset plugin but I can't see why. Can you check why it fails with this combi?
Foutdetails
===========
Een fout van het type E_ERROR werd veroorzaakt op regelnummer 29 van het bestand wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/lib/auryn/lib/StandardReflector.php. Fout bericht: Uncaught ReflectionException: Class "OTGS\Toolset\Types\Compatibility\Yoast\Field\Repository" does not exist in wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/lib/auryn/lib/StandardReflector.php:29
Stack trace:
#0 wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/lib/auryn/lib/StandardReflector.php(29): ReflectionClass->__construct('...')
#1 wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/lib/auryn/lib/CachingReflector.php(73): OTGS\Toolset\Common\Auryn\StandardReflector->getParamTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#2 wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(527): OTGS\Toolset\Common\Auryn\CachingReflector->getParamTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#3 wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(474): OTGS\Toolset\Common\Auryn\Injector->buildArgFromTypeHint(Object(ReflectionMethod), Object(ReflectionParameter))
#4 wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/lib/auryn/lib/Injector.php(639): OTGS\Toolset\Common\Auryn\Injector->provisionFuncArgs(Object(ReflectionMethod), Array, Array, '...')
#5 wp-content/plugins/types/application/bootstrap.php(115): OTGS\Toolset\Common\Auryn\Injector->execute(Array)
#6 wp-includes/class-wp-hook.php(324): {closure}('')
#7 wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters(NULL, Array)
#8 wp-includes/plugin.php(517): WP_Hook->do_action(Array)
#9 wp-admin/admin.php(385): do_action('...')
#10 wp-admin/post.php(12): require_once('...')
#11 {main}
thrown
WP/Plugin Versions:
WordPress versie 6.6.2
Toolset Blocks Versie 1.6.16
Toolset Types Versie 3.5.2
Yoast: Versie 23.5
Thanks for the feedback!
Hi sorry for the late reply. I wonder if I am allowed to create a copy of the staging website and report this to the second tier support to see what they suggest?
I also tested with all other plugins and the theme deactivated and only Toolset and Yoast enabled the error happens.
thanks.
For sure! As we want the issue to be fixed.
Do i need to send you files or can you make the backup with your admin account?
Hi,
Thank you very much. I created a copy of the website and reported this to the second tier support.
I will update you here as soon as I have news.
It may take time as the second tier support needs to go to the details and troubleshoot the code to see if there is an issue with inherit Toolset code or something that can be handled related to your website.
Thanks.
Hi,
The second tier support deleted the Toolset Types plugin and installed it again via plugin upload and it worked.
You can check now the staging version of the website.
Please do the same for te live website after making sure you have a backup of the website.
Thanks.
Hi,
I did a compare for the Types plugins on staging and production environment.
It seemed that here were files missing in the original Types plugin folder on prod. Any idea how that can happen?
I've installed the plugin in the past using the update mechanism of WP, and a manual install using FTP.
Can't get it why they were missing at that point.
Although, by adding the missing files to the production version, all seems to work fine.