Problem/Motivation
In D7 return batch_process(''); would perform a batch and then take you to the front page. In D8 this result in the same behaviour as passing in NULL - i.e. being taken back to the same URL.
Proposed resolution
Improve docs to inform callers to use return batch_process('<front>'); if desired.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #20 | interdiff.2978922.17-20.txt | 1.42 KB | brathbone |
| #20 | 2978922-20.drupal.Improve-batchprocess-documentation.patch | 2.13 KB | brathbone |
| #17 | interdiff.2978922.14-17.txt | 2.21 KB | brathbone |
| #17 | 2978922-17.drupal.Improve-batchprocess-documentation.patch | 2.14 KB | brathbone |
| #14 | interdiff-12-14.txt | 1.92 KB | msankhala |
Comments
Comment #3
mradcliffeI've added a couple of tags. This could use a little investigation to improve the issue summary to outline the changes before starting on the patch.
Comment #4
philipnorton42 commentedAdded documentation to the batch_process() function to further detail what happens when falsey values are passed as the redirect parameter.
Comment #5
siliconmeadow commented@philipnorton42 - what about further elaboration using the *Proposed resolution* above? I'm struggling to make sense of those docs generally, and to me it seems that the two lines you've added is simply restating what was said in the lines above.
Maybe my general understanding is lacking in the first place?
Comment #6
philipnorton42 commented@siliconmeadow - You are correct. Now you point it out what I've added does not add value.
I think this issue has been created to show users who are familiar with batch processing in Drupal 7 that they should be aware that it's a little bit different in Drupal 8. As such it might be best change it to the following
Comment #7
jollysolutionsThat would seem to be a better way to explain the differences.
Comment #8
philipnorton42 commentedSpeaking to @john-cook we think it might be better not to mention the difference between D7 and D8 and just state what to do if you want to send the user to the home page.
As a result, maybe this might be a better way to word the functionality:
To return the user to the home page use batch_process('<front>').Comment #9
philipnorton42 commentedUpdating patch with latest wording.
Comment #10
jollysolutionsLooks good to me
Comment #11
alexpottI think this line should be at the end of the paragraph which details what happens when the argument is provided and not what happens when it is not. Also the user is not returned to the home page - they probably have not started there. They are redirected to it. So I think text like
For example, to redirect users to the home page use '<front>'.is better.Comment #12
hardikpandya commentedComment #13
alexpottThe comment needs re-flowing "redirect to" now fits on the line above.
Comment #14
msankhala commentedHere is the patch which fixes #13.
Comment #15
joachim commentedLatest patch appears to reflow a paragraph that's further down.
Comment #16
msankhala commentedI am not sure if @param description can have multiple paragraphs. I thought it should have only one paragraph in the description that is why I moved that paragraph to up.
Comment #17
brathbone commentedHello. I found the "Note that to simply force a batch to..." sentence a bit difficult to follow. Please see the attached patch which rewrites that sentence and has some other minor changes to smooth out the wording, while retaining the information.
Comment #18
brathbone commentedComment #19
joachim commentedThanks! I agree, the 'note that' was a little hard to follow; this makes it clearer.
Just one thing:
These should be straight quotes, not smart quotes.
Comment #20
brathbone commentedThanks for taking a look, @joachim. Here is a new patch with the smart quotes converted to straight quotes. (Also...I find dorgflow very useful!)
Comment #21
joachim commentedI think this looks good.
(Great to hear that dorgflow is useful to people, thanks!!)
Comment #22
catchCommitted and pushed 34b94c8c3a to 8.7.x and 8f75b2aacc to 8.6.x. Thanks!