If drupal_debug() tries to write to file and fails the error is simply "The file could not be written.". It would be nice if this at least said that this was from the devel module to help debug the problem quickly. Patches to follow.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

justanothermark’s picture

Patches for 7.x-1.x and 8.x-1.x attached.

justanothermark’s picture

Oops, new message was inconsistent between branches. Fixed 7.x-1.x patch.

salvis’s picture

+++ b/devel.module
@@ -1679,7 +1679,7 @@ function drupal_debug($data, $label = NULL) {
-    drupal_set_message(t('The file could not be written.'), 'error');
+    drupal_set_message(t('The debug file could not be written to by Devel.'), 'error');

Can we use active voice? Something like "Devel was unable to write to %file."

justanothermark’s picture

Sounds good to me. I'll admit that I wasn't completely happy with the message I suggested but hadn't thought about the alternatives & just made the simplest change to get the info in there. 7.x patch with new message attached.

pcambra’s picture

Patch in #4 is empty

justanothermark’s picture

Apologies, not sure how I managed to upload an empty file but another attempt (and I've tested the uploaded file isn't empty this time).

pcambra’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
justanothermark’s picture

Patch to make same change for 8.x attached. Patch in #6 is for 7.x.

justanothermark’s picture

Missing full stop in updated message.

salvis’s picture

Status: Needs review » Fixed

Committed to D8/D7/D6 -- thanks, justanothermark!

Status: Fixed » Closed (fixed)

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