- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot define a correlation name 'store_table' more than once
We are using Magento 2.3.2 enterprise edition, we have created a new website, created a new user and role as well.
For that role keep role scope as custom and select only the newly created website, and in role resources select the content section.
After that login as the new user and click on content->pages/content->blocks I'm seeing this zend exception "You cannot define a correlation name 'store_table' more than once".
Can anyone know about this and what might be the fix for this.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
Hello,
Seems like you are using some third-party module and it is creating issue,
please try to find such a module and disable it.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
Hi sunil
I have checked the same issue with default Magento 2.3.2 EE.
I am getting same issue
.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
Hi sunil,
I have checked the same issue with default Magento 2.3.2 EE.
I am getting same issue
.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
Hello @vinod_kumar22
Are you using fresh DB as well?
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
Yes sunil fresh db( default magento 2.3.2)
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
@vinod_kumar22 ha escrito:We are using Magento 2.3.2 enterprise edition, we have created a new website, created a new user and role as well.
For that role keep role scope as custom and select only the newly created website, and in role resources select the content section.
After that login as the new user and click on content->pages/content->blocks I'm seeing this zend exception "You cannot define a correlation name 'store_table' more than once".
Can anyone know about this and what might be the fix for this.
Good estimates I am presenting the same problem.
Magento see. 2.2.10
They could give you a solution or guide me of what could be the inconvenience.
I await your comments
regards
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: You cannot define a correlation name 'store_table' more than once
Hi,
We faced the same issue when created a custom role for a specific store. After debugging this, I found that the problem is on the plugin
vendor/magento/module-admin-gws/Plugin/CollectionFilter.php
In beforeLoadWithFilter, this line
$collection->addStoreFilter($this->role->getStoreIds());
is executed 2 times. This is defined in:
#vendor/magento/module-cms/Model/ResourceModel/Page/Collection.php public function addStoreFilter($store, $withAdmin = true) { if (!$this->getFlag('store_filter_added')) { $this->performAddStoreFilter($store, $withAdmin); } return $this; }
The problem is that the store_filter_added flag is never initialized.
This was fixed in this commit https://github.com/magento/magento2/commit/21cbf17130ac362c91cd0e1a46c5aa3e43f0df4d in Magento 2.3.4
In order to fix this, we patched the file vendor/magento/module-cms/Model/ResourceModel/Page/Collection.php adding this
$this->setFlag('store_filter_added', true);
Hope this helps someone else
Regards