-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
New bulk schedule doesn't create operations automatically #23958
Comments
Hi @duckchip. Thank you for your report.
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:
For more details, please, review the Magento Contributor Assistant documentation. @duckchip do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
@magento give me 2.3-develop instance - upcoming 2.3.x release |
Hi @vijay-wagento. Thank you for your request. I'm working on Magento 2.3-develop instance for you |
Hi @vijay-wagento, here is your Magento instance. |
I will close this issue since there's a workaround (thanks to @nuzil for sending me in the right direction). This should be documented in the devdocs as well (will create a PR for that later.) The trick for saving those operations is by calling the Operations Repository. Given the example of the devdocs
We'll have to call use the MassSchedule:
instead of
since the MassSchedule uses the OperationRepository to save the Operation entities. |
Hello, |
I am also having this issue with Magento 2.3.2. The message still states "Task "Update attributes for 4 selected products": 1 item(s) have been scheduled for update." even after trying to make the code modifications. It seems that the change does not take into account updates that are already queued. How do you get rid of or cancel a queued update? |
This issue has been closed but the problem remains: Magento bulk actions (the ones offered by magento not custom ones) simply don't work. Yet there is no other open issue to track this. |
@arion-p: if there is no issue tracking your problem, I would suggest you open one 😉 @zw1111: your issue also doesn't sound related, you might find more help here: #23450 (comment) |
@hostep: there was an issue tracking my problem: this one but it was closed. I may be missing something here but here are the facts:
The end result is that the issue described in the 1st post is not going to be fixed because there is no longer an open ticket about it. btw @zw1111's issue is also exactly the same as the one described in the 1st post (and in the stack exchange thread mentioned above as well as the this thread in magento community: https://community.magento.com/t5/Magento-2-x-Admin-Configuration/Bulk-Actions-issue/td-p/138226) |
@arion-p: I can't reproduce the issue from stackexchange or the community forums on a vanilla 2.3.2 installation with a working cronjob and working message queue consumers. This issue here is for custom written bulk actions, not for the ones included in Magento by default. So what I suspect is that something is preventing the message queue consumers to spawn somehow, can you read #23450 (comment) and do some debugging and try to figure out why they aren't spawning in your case? Helping in finding the cause might get us closer to figuring out how to solve it for everybody, thanks! 🙂 |
In my case cron and the consumers are running.
This resulted in an entry added in Looking at Magento/Catalog/Controller/Adminhtml/Product/Action/Attribute/Save::publish it uses:
instead of using MassSchedule as suggested earlier. As a result it should suffer from the same issue. |
Further update: On my normal installation it occasionally works but usually it does not. When it works I cannot figure out the conditions when it fails and logging is a bit slim. This is clearly something else. I will investigate further and open a new issue if I find something concrete |
The same thing happened to me on 2.3.2. If you are running on Magento Cloud, the support team was able to provide a solution that got them back running for me: Please update .magento.env.yaml and add these lines (see https://devdocs.magento.com/guides/v2.3/cloud/env/variables-deploy.html#cron_consumers_runner): deploy: Sounds like it may be related to the RabbitMQ Message Queues, can follow this for non Magento Cloud environments: https://devdocs.magento.com/guides/v2.3/config-guide/mq/manage-message-queues.html |
i did it with deleting the entries in the |
Same here. Bulk edit has actually never worked. I'm following all issues but they all get closed without solution. I now fix these bulk edits by working with database queries but this should not be necessary. |
Also having this issue |
Ok guys, can anybody who has "this issue" please open a new ticket with exact steps to reproduce? "This issue" here was created for writing your own custom bulk schedule jobs for which the documentation wasn't very clear. It was closed by the author because the solution was found for this custom implementation. "This issue" was not for running into default Magento bulk job problems. |
I applied the solution already linked previous post, https://magento.stackexchange.com/questions/281723/magento-2-bulk-actions-not-starting, edit file: vendor/magento/module-asynchronous-operations/Model/BulkManagement.php adding "$this->entityManager->save($operation);":
This got bulk changes working for what I needed and I was able to run the same update process from magento's admin (updates to new to, new from, and product status enable). Now I still have the message of: This is from the failed bulk product update which appears like it will never run. I found it in the tables below: I'm hesitant to dive in and just delete a row, is there any other tables involved or code, and can I simply delete the row from "magento_bulk"? Realise this topic is closed, but would be handy to have a clear fix here. |
Well, interestingly for me this just cleared up by itself 26 hours later in the back end, but the two database tables remain the same, apparently out of sync? |
I am still getting this issue on 2.3.1. My cron is configured ok server side and crons are running. The queued jobs just never start. Did anyone find a definitive cause/fix for this issue? I triggered some attribute updates and these are correctly listed in the bulk log screen but they stay on pending. I removed legacy entries from the magento_bulk table. Server side I ran Any help would be good. |
@davidrthomson: make sure your Also: since you are using Magento 2.3.1, you shouldn't have the If you are running Magento 2.3.2 or higher, make sure the Also, if you are talking about the default consumers Magento ships with which aren't running automatically, then please follow #23450 which contains some useful hints in various comments. |
This worked for me |
Facing issue in 2.3.4, was it fixed ? |
Hello Guys, |
@Anantkprajapati: if you are building your custom bulk scheduling system (which this issue is about), then the answer was already given above. If you are having problems with the default queues of Magento, you need to either search for other issues, or create a new issue where you provide steps of how to reproduce the problem you are running into (For Magento 2.4.0, there are some known problems: #29718 & #29797 for example) |
The problem with Bulk Actions is still present in 2.4
solves the problem for admin panel, but introduces another with bulk actions via REST API asynchronous bulk operations. Batch job gets created with operations, but never finishes. Operations seem to be executed, but the job stays "In progress" forever. |
@forcecodema, #29814 should fix the status of job issues in 2.4.0 if I understand it correctly (see #29718 or #29797 for more info). |
Preconditions (*)
Steps to reproduce (*)
In this scenario we add 1 operation to a bulk. The moment
scheduleBulk
is called, a new record inside themagento_bulk
table is created.Even with the queues up and running the operations are not created and stay "Pending"
I think the problem relies in the fact that the operation entities are never saved to the database.
Following function of class Magento\AsynchronousOperations\Model\BulkManagement
Adding this line
$this->entityManager->save($operation);
in thepublicOperations
function, resolves that problem for me.Expected result (*)
Actual result (*)
The text was updated successfully, but these errors were encountered: