I make update from Magento 2.2.3 to 2.3.6 with Porto theme. In the home page i have this error:
......./vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\View\Element\Template), '/chroot/home/ae...', Array) #4 /ch in /chroot/home/aec8be3d/b4115eb564.nxcli.io/vendor/magento/module-search/view/frontend/templates/form.mini.phtml on line 27
i look here: https://magento.stackexchange.com/questions/328563/fatal-error-uncaught-error-call-to-a-member-func...
but i don' have a solution
my php version is 7.1.3
Hello @papaeredi
Please run the following commands
chmod 777 var/ generated/ pub/static/ pub/media/ php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:flush chmod 777 var/ generated/ pub/static/ pub/media/
If your Problem Solved with this ? Click on 'Kudos' & Accept as Solution !
The error message you're encountering, "Fatal error: Uncaught Error: Call to a member function isSuggestionsAllowed() on null," is a PHP error, and it typically occurs when you're trying to call a method on an object that doesn't exist or is null.
Here are some steps you can take to troubleshoot and potentially resolve this error:
Check for Variable Assignment: Ensure that the variable you're trying to call the isSuggestionsAllowed() method on is properly assigned and initialized. It should refer to an object that has this method.
Verify Object Existence: Double-check whether the object you're trying to call the method on exists and is not null. If the object is expected to be created or returned from a function, make sure that function is working correctly and returning a valid object.
Check Function Arguments: If this error occurs within a function or method, review the function's arguments to ensure you're passing the correct object as an argument, and it's not null.
Error Handling: Implement error handling and checks in your code to handle cases where objects might be null or not properly initialized. You can use conditional statements (e.g., if or isset) to ensure that you're only calling methods on valid objects.
Review Stack Trace: The error message usually includes a stack trace that shows the sequence of function calls leading to the error. Review this stack trace to identify the source of the issue, which can help you pinpoint where the object became null.
Without seeing your specific code and context, it's challenging to provide a precise solution, but these general steps should help you diagnose and resolve the "Call to a member function on null" error. If you're still having trouble after attempting these steps, please provide more context or code snippets for more targeted assistance. qr code scanner