If for some reason a derivative is missing, it is automatically regenerated. Wouldn't it be better to notify the site-admin instead of confusing a visitor? To solve this, only a minor change is required: change line 627

drupal_set_message(t('The image %title had missing derivative image which has been regenerated.', array('%title' => $node->title)));

to:

watchdog('image', t('The image %title had missing derivative image which has been regenerated.', array('%title' => $node->title)), WATCHDOG_NOTICE);
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

it's a good idea to add those to the watchdog but i'd still like to show the message to an admin.

VDG’s picture

I understand, but the output of drupal_set_message is shown to every user, so for visitors this could be confusing. Also, if a visitor gets the message, the admin won't know. On the other hand, if you send it to the watchdog, everyone with permission to access the administration pages will see the message.
An alternative would be to check $user->uid or $user->rid.

Standart’s picture

I agree. This is not a message for end-users.

drewish’s picture

i think anyone with 'edit images' permission (which would include uid=1 by default) should see the message.

Anonymous’s picture

I agree with VDG. This message isn't helpful for visitors/users and should be logged only.

Will Kirchheimer’s picture

From my point of view (large social networking site, lots of people uploading images)

It seems to me that this is a admin level message

2 cents

drewish’s picture

roll a patch. i've already said that i'm okay with changing it to making it an admin feature.

drewish’s picture

Status: Active » Fixed

accidentally posted the patches for this over on:
http://drupal.org/node/156127#comment-293037
http://drupal.org/node/156127#comment-293039
screwed up the commit messages too...

Anonymous’s picture

Status: Fixed » Closed (fixed)
yhager’s picture

Version: 5.x-1.4 » 5.x-1.7
Status: Closed (fixed) » Active

I'm reopening this, since the issue is happening again.
See this diff:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/image/image...

John Bickar’s picture

Version: 5.x-1.7 » 5.x-2.0-alpha3
Status: Active » Needs review
FileSize
946 bytes

Patchy attachy.

John Bickar’s picture

FileSize
2.38 KB

Patch updated to send all messages to the watchdog that anonymous users should not see about derivative images being rebuilt.

sun’s picture

Version: 5.x-2.0-alpha3 » 6.x-1.0-alpha4
Status: Needs review » Needs work

As drewish mentioned, the messages should be displayed for administrative users and only hidden for regular/anonymous users.

sun’s picture

Title: "missing derivative" message » Hide derative image size messages for non-administrative users
Priority: Minor » Normal

Better title. A proper patch has very chances to be committed, instantly.

John Bickar’s picture

Title: Hide derative image size messages for non-administrative users » Hide derivative image size messages for non-administrative users
killes@www.drop.org’s picture

IMO the messages should be completely dropped. They don't provide useful info. Failure to create derivatives should be recorded instead.

sun’s picture

Title: Hide derivative image size messages for non-administrative users » Remove derivative image size rebuild messages
Status: Needs work » Needs review
FileSize
4.23 KB
Leeteq’s picture

It would be important for admins to get to know if a site has a problem and is regenerating images more often than what is "normal". How to cater for that?

These messages should not be shown to the end user, not even with those with edit picture permissions.
As an admin, it should also be possible to avoid them.

If it is important for a user with such permissions to verify that images have indeed been regenerated, then better provide an overview/log page for this, which filters relevant messages from the watchdog.

Standart’s picture

How about giving the admin the choice on the settings page to turn on logging of derivative image size creation in the watchdog?

sun’s picture

Version: 6.x-1.0-alpha4 » 6.x-1.0-alpha5
Status: Needs review » Fixed
FileSize
3.8 KB

Thanks for reporting, reviewing, and testing! Committed attached patch.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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