Magento2: Exception #0 (InvalidArgumentException): Element with id "system_cron_template_use_separate_process" already exists

Created on 20 Jul 2018  路  5Comments  路  Source: magento/magento2

Preconditions

  1. Magento 2.2.4 and Magento 2.2.5 CE

Steps to reproduce

  1. When i try to navigate in admin panel to Configuration -> Advanced -> System am getting the below error
    `1 exception(s):
    Exception #0 (InvalidArgumentException): Element with id "system_cron_template_use_separate_process" already exists

Exception #0 (InvalidArgumentException): Element with id "system_cron_template_use_separate_process" already exists

0 /home/vagrant/repos/magento2/vendor/magento/framework/Data/Form/Element/AbstractElement.php(93): Magento\Framework\Data\Form->checkElementId('system_cron_tem...')`

screen shot 2018-07-20 at 10 03 09 am

But if i change the group id from cron to something else in vendor/magento/module-cron/etc/adminhtml/system.xml it is working fine. I made this change just to test. FYI, I didnt have any group id called cron in all my custom modules in app/code.

And only place where i can see group id="cron" is from module-cron and module-new-relic-reporting. I tried disabling new relic module also but no use.

Did anyone face any issue like this? Or is this a data issue? where do i find details related to it in DB?

Expected result

  1. I should see the system tab content on admin

Actual result

  1. `1 exception(s):
    Exception #0 (InvalidArgumentException): Element with id "system_cron_template_use_separate_process" already exists

Exception #0 (InvalidArgumentException): Element with id "system_cron_template_use_separate_process" already exists

0 /home/vagrant/repos/magento2/vendor/magento/framework/Data/Form/Element/AbstractElement.php(93): Magento\Framework\Data\Form->checkElementId('system_cron_tem...')`

Cannot Reproduce Format is valid

Most helpful comment

@Supplement I figured out this issue later, So the solution for me is i had a etc/cron_groups.xml in one of my custom module, in that we need to have 1
mandatory, i was missing that. Make sure all your custom modules cron_groups.xml has the above field.

My cron_groups.xml for your reference.

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd"> <group id="order_update"> <schedule_generate_every>1</schedule_generate_every> <schedule_ahead_for>4</schedule_ahead_for> <schedule_lifetime>2</schedule_lifetime> <history_cleanup_every>10</history_cleanup_every> <history_success_lifetime>60</history_success_lifetime> <history_failure_lifetime>600</history_failure_lifetime> <use_separate_process>1</use_separate_process> </group> </config>

All 5 comments

Hi @arunelangovan. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • [ ] Summary of the issue
  • [ ] Information on your environment
  • [ ] Steps to reproduce
  • [ ] Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento-engcom-team give me {$VERSION} instance

where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.

@arunelangovan do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • [ ] yes
  • [ ] no

No i cannot reproduce it in vanilla magento

Hello @arunelangovan, thank you for your report. Unfortunately I wasn't able to reproduce this issue on clean magento 2.2.4 nor 2.2.5 installations.
I'm closing this issue for now. If you'd like to update it, please reopen the issue.

Was there ever an answer for this problem? You and I are like the only two people in the world with this same issue. ehhhh

@Supplement I figured out this issue later, So the solution for me is i had a etc/cron_groups.xml in one of my custom module, in that we need to have 1
mandatory, i was missing that. Make sure all your custom modules cron_groups.xml has the above field.

My cron_groups.xml for your reference.

<?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Cron:etc/cron_groups.xsd"> <group id="order_update"> <schedule_generate_every>1</schedule_generate_every> <schedule_ahead_for>4</schedule_ahead_for> <schedule_lifetime>2</schedule_lifetime> <history_cleanup_every>10</history_cleanup_every> <history_success_lifetime>60</history_success_lifetime> <history_failure_lifetime>600</history_failure_lifetime> <use_separate_process>1</use_separate_process> </group> </config>

Was this page helpful?
0 / 5 - 0 ratings