Troubleshooting MarketConnect Promotion Fatal Errors
After applying the WHMCS 7.6 update, an Oops message may appear on the shopping cart or client area pages.
When the Display Error or Log Error options are enabled, errors referencing the MarketConnect Promotion method are displayed:
PHP Fatal error: Method WHMCS\MarketConnect\Promotion\CartPromotion::__toString() must not throw an exception, caught WHMCS\Exception\ViewNotFound: in /path/to/whmcs/vendor/whmcs/whmcs-foundation/lib/MarketConnect/Promotion.php on line 0
Exception 'Whoops\Exception\ErrorException' with message 'Call to undefined method WHMCS\MarketConnect\Promotion\PromotionContentWrapper::hasHighlights()'
These kind of errors are caused by an outdated template cache, outdated templates or discontinued order form template.
WHMCS updates often include changes to template files which are mandatory for the continued functionality of the software. If a custom template has been created using the previous version, these changes must be merged into the custom template.
First, follow these steps to clear the template cache:
- Login to your WHMCS Administration Area
- Navigate to Utilities > System > System Cleanup
- Click Go in the Empty Template Cache section
Second, the problem can be immediately resolved by switching to the Six template via the Setup > General Settings > General tab
Third, if using a custom template, please review the template changes within the release notes for version 7.6: https://docs.whmcs.com/Version_7.6.0_Release_Notes#Template_Changes
The changes must be merged into the custom template files.
Once the custom template files have been updated, the errors will be resolved.
Finally, ensure a current order form template is in use:
1. Navigate to Setup > General Settings > Ordering tab
2. Select one of the following order form templates:
- Cloud Slider
- Standard Cart
- Premium Comparison
- Pure Comparison
- Supreme Comparison
- Universal Slider
3. Click Save Changes