-
Notifications
You must be signed in to change notification settings - Fork 94
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
Error "Invalid model/method definition, expecting "model/class::method", got "" instead" when using Aoe_Scheduler and Xtento_OrderExport #501
Comments
Hello @mzeis There is nothing relating MailChimp For Magento with this error. Regards |
@Santiagoebizmarts EE 1.14.2. |
Okay, how did it go to with version 1.1.9.1? |
@Santiagoebizmarts I can try and ask the merchant if we can test this - sorry can't promise it. FYI: using the cron group feature to separate the mailchimp cronjobs from the other jobs solves the problem. |
Thanks we will review this. Regards. |
@mzeis: Hi, Sebastian @ XTENTO here. Thank you for detecting the connection between Aoe Scheduler, XTENTO Order Export and MailChimp. We've been having this issue for quite a long time but were never really able to figure out what caused this. We always thought it's some kind of sophisticated bug in AOE Scheduler, as it doesn't seem to happen when AOE Scheduler is not installed, but now that I think I know what's going on, I think that AOE Scheduler is not the actual problem; when AOE Scheduler is not installed, nobody notices this error as no exception is thrown with Magentos internal cron module. Our Magento 1 import/export modules listen for the "default" event in the
Now, having checked the code of the Mailchimp module, the problem is probably this: The call on line 1012 to
in the Mailchimp module causes the Magento configuration to be re-initialized:
At that point, the cron configuration we injected dynamically is "gone", and even though AOE Scheduler has an entry in the cron_schedule table and knows it is supposed to execute our cronjob, it can't find it anymore as it's not in the configuration as it has been "reset" by Mailchimp. This would make sense per Matthias description, as the error would only occur if the Mailchimp cron executes before our cron; not the other way round. So, @Santiagoebizmarts - can you please look into removing the cleanCache call? And check if cleanCache is called somewhere else in your codebase during cron execution? |
Hello, |
@Mandrino In my experience, with OrderExport this only happens if both jobs are scheduled for the same minute, are processed in the same process (= group) and if the MailChimp job is executed before the Xtento job. Is this the case for you too? |
@mzeis However, at the Moment, I am nor sute which one is executed first when the server hits cron.sh . I'll have to surveil that. |
Hello @ikk0 Thank you very much for this great feedback. Unfortunately there are some changes in the core_config_data table that require the cleanCache command to be executed in order for the changes to be applied. We will try to find a workaround but in the meantime I would suggest to avoid running xtento cron job until the initial sync finishes. After this the cleanCache command will not be executed. Regards. |
Hi all. Just to add to this, after @ikk0 pointed me in the right direction of this, disabling AOE scheduler has corrected the exact same issue as described by @mzeis. For me, the issue started at the exact same time I switched from Magemonkey to MC for Magento. |
Couldn't this be resolved by only flushing the affected cache types Or disabling cache first, then make chances, and then enable + save cache once again? |
We still have this issue. |
I has grown worse in v1.1.12 - we weren't really affected in v1.1.11 and previous versions. |
@m-overlund I guess you mean 1.1.11 because there is no 1.1.12 yet. Please try the fix below, according to @mzeis this should solve the problem. Regards. |
@Santiagoebizmarts , yeah, meant after upgrading from .10 to .11. But the underlying issue is still there, as @ikk0 pointed out, and will still collide with other modules and people who does not use AOE scheduler for cron. |
The commit isn't a solution to the problem. Please consider reopening |
@Santiagoebizmarts The commit does not work as a quick fix too. Second thought: |
See here for a guide on how to move your Mailchimp crons into a separate cron group: https://support.xtento.com/wiki/AOE_Scheduler:_Invalid_model_/_method_definition#Possible_fix_when_using_Mailchimp_in_Magento_1 Make sure to use a recent version of the Mailchimp module to make sure it supports cron groups. (I am not sure if older versions specify the cron group in the section of config.xml, so better use the latest version) This is not a fix of the problem in the Mailchimp module but rather just a solution to get your XTENTO crons and any other crons that use dynamic cron injection to run again. By separating the Mailchimp crons from all other crons, this will do the trick. |
Mailchimp 1.1.8 causes Xtento Order Export cronjobs to fail when
I didn't test with 1.1.9 yet. It used to work with the old MageMonkey extension. I assume only Xtento is affected because they create the cronjob config XML dynamically.
Pre-conditions for re-production
Extensions
Cronjob schedule
Re-production
If Magento chooses to run the order export job first, everything will work fine. If mailchimp jobs are executed first, the order export job will fail with this message:
While I understand that other 3rd party extensions are involved I report this here because it used to work with the MageMonkey extension and it's reproducible for us that the installation of the Mailchimp extension breaks this functionality.
The text was updated successfully, but these errors were encountered: