Download & Extend

drupal_cron_run() unconditionally re-enables writing of the user session

Project:Drupal core
Version:7.x-dev
Component:cron system
Category:bug report
Priority:normal
Assigned:sun
Status:closed (fixed)
Issue tags:needs backport to D7, Testing system

Issue Summary

Spin-off from #1215104: Use the non-interactive installer in WebTestBase::setUp()

Problem

  • Any call to drupal_cron_run() (re-)enables writing of the current $user's session.

Details

AttachmentSizeStatusTest resultOperations
drupal8.cron-run-session-save.0.patch685 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 39,745 pass(es).View details

Comments

#1

Component:base system» cron system

#2

Status:needs review» reviewed & tested by the community

Seems to be the right way to do it and it fixes existing problems at least with install_drupal :)

#3

drupal8.cron-run-session-save.0.patch queued for re-testing.

#4

drupal8.cron-run-session-save.0.patch queued for re-testing.

#5

Status:reviewed & tested by the community» needs review

Looks fine but the variable name $old_save_session doesn't look right. Can we just call that $original_session or something?

#6

$original_session would be misleading, since the variable doesn't contain $_SESSION.

So I went with $original_session_saving.

AttachmentSizeStatusTest resultOperations
drupal8.cron-run-session-save.6.patch699 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 39,800 pass(es).View details

#7

Version:8.x-dev» 7.x-dev
Status:needs review» patch (to be ported)

OK that works well enough, I can't think of anything better. Committed/pushed to 8.x, moving to 7.x for backport.

#8

Backported!

AttachmentSizeStatusTest resultOperations
drupal7-cron_run_session_save-1688016-8.patch679 bytesIdlePASSED: [[SimpleTest]]: [MySQL] 39,348 pass(es).View details

#9

Status:patch (to be ported)» needs review

#10

Status:needs review» reviewed & tested by the community

Thanks!

#11

Status:reviewed & tested by the community» fixed

Hm. That variable name is indeed pretty terrible, but all the alternatives I can think of are 57-characters long and I know how you feel about those. ;P

Committed and pushed to 7.x. Thanks!

#12

Status:fixed» closed (fixed)

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

nobody click here