-
Notifications
You must be signed in to change notification settings - Fork 111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to create a new Mailchimp Store in admin #1208
Comments
thanks for pointing that.
|
Hi @gonzaloebiz Thank you for taking the time to check my issue. In the example given, both variables The class Here is your example, but modified to show this:
|
Weird, in my tests all work OK, even without any predefined store (and i already say, we have more than 650k installations, which is so weird) I'm not saying that your point is wrong, but I'm trying to understand if we have an issue and if this is the case why is working in 650k installations, I know that the easy way is to rename the variable but I'm trying to understand the problem. What version of PHP are you using? |
I'm running on PHP 7.2.29, with nginx 1.16.1. I agree with you that this is really weird. I'm able to reproduce my issue on my production server, but not on my local environment. One of the difference between those environnement is the Magento mode used. Maybe this issue can only reproduced using 'production' mode with Magento. I'll have to try that later today. I'll report back when I have more information. |
i just try with production mode and works ok. |
can you try installing the dev-Issue1208-2.3 version? run:
Best |
Hi @gonzaloebiz Sorry, I didn't had time yesterday to answer your previous question. Yes, we have many other extensions installed on our Magento. I don't think they would interfere with the admin Controllers of the Mailchimp module. Thank you for the fix, I will install it on my production server later today and report back. |
Hi @gonzaloebiz I was able to test your patched version, earlier than expected, on my production server. I can confirm that I was able to create a new Mailchimp store with your fix. I'm still not sure why others don't have the same issue. Thank you for the fix. |
Thanks @pascal-novatize for your contribution |
I am having the same issue on Magento 2.4.1 Fatal error: Uncaught Error: Class 'Ebizmarts\MailChimp\Controller\Adminhtml\Stores' not found in /home/xxxxx/xxxxx/public_html/app/code/Ebizmarts/Mailchimp/Controller/Adminhtml/Stores/Index.php:17 any help please |
Preconditions
Steps to reproduce
Actual and Expected result
Expected result:
The Mailchimp Store is created. You are then redirected to the previous page where you can see your new store.
Actual result:
Magento crashes, showing a 500 error page.
Additional information
Looking in my php-fpm logs, I found this error:
PHP Fatal error: Uncaught Error: Call to undefined method Ebizmarts\MailChimp\Helper\Data::getUrl() in /var/www/###/vendor/magento/module-backend/App/AbstractAction.php:364
I believe this issue was reported before, but never fixed (see issue #930).
Cause of the problem
If we look in the constructor of the class
Ebizmarts\MailChimp\Controller\Adminhtml\Stores
, we can see this line:The problem is that, at that point, this protected property is also declared and already initialized in our parent class
Magento\Backend\App\AbstractAction
:So, we can quickly see why the following method is failing:
The
AbstractAction
class is expecting the_helper
property to be an instance of\Magento\Backend\Helper\Data
, but instead it has been replaced by your helper.How to fix
In short, the
_helper
property defined in the classEbizmarts\MailChimp\Controller\Adminhtml\Stores
should be renamed something else.The text was updated successfully, but these errors were encountered: