Problem/Motivation

Generating a large number of revisions can cause problems in the performance of the site, as well as exceeding the maximum execution time of the PHP script and throwing an error.

Proposed resolution

Generate revisions when they are more than 10 using batch processing.

Remaining tasks

Create a patch with revisions processed by batches when submitting the form.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

Comments

diosbelmezquia created an issue. See original summary.

adriancid’s picture

I think we should always use the batch.

slydevil’s picture

Assigned: dmezquia » slydevil
dmezquia’s picture

Hi @slydevil, I see that you assigned this task to you, I already have this done for Drupal 8, I just need to try it a bit more, but well if you want to do it, there's no problem.

slydevil’s picture

I'll leave it with you @diosbelmezquia :) Let me know if you need it ported to D7.

slydevil’s picture

Assigned: slydevil » Unassigned
adriancid’s picture

@diosbelmezquia if you need some help maybe @slydevil can help us, in this case just upload your patch and we can finish the issue together. But if you will finish in the next days I think @slydevil should wait and then review it, I will review it too without problems.

@slydevil is a good idea if you can do the d7 patch, then Diosbel can finish the d8 patch. Is good to see that we can finish this module soon with your help.

dmezquia’s picture

Ok, no problem @slydevil , even if you have a solution upload the patch, and yes, i will upload it just for D8, it would be necessary to port it to D7.

slydevil’s picture

7.3 patch attached.

slydevil’s picture

@adriancid, glad I could help!

dmezquia’s picture

@slydevil If you have the solution for Drupal 8 upload it too.

slydevil’s picture

Hey guys, D8 patch attached.

slydevil’s picture

Status: Active » Needs review
dmezquia’s picture

@slydevil I see the yours patch for D8 is correct and works, only what I see is that without having `$nodes_for_revisions` it goes to batch processing when reality is not being created revisions because there is no $nodes_for_revisions.

I upload my patch just because I already had it done, but yours works well and I use the same logic you used in yours patch.

  • adriancid committed 273d510 on 7.x-3.x authored by slydevil
    Issue #3058355 by slydevil, diosbelmezquia, adriancid: Add batch...
adriancid’s picture

Status: Needs review » Patch (to be ported)

  • adriancid committed d15fc92 on 7.x-3.x
    Issue #3058355 by slydevil, diosbelmezquia, adriancid: Add batch...

adriancid’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.