Don't show preset create directory messages to anonymous users

joostvdl - April 27, 2009 - 21:21
Project:ImageCache
Version:6.x-2.0-beta9
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Description

When using Imachecache to create images (thumbnails) the site shows even for an anonymous user the message: The map sites/default/files/imagecache/... is created

Error Reporting is for the site set to write only to the logfile. So it should not be shown.

#1

joostvdl - April 27, 2009 - 21:24
Title:Message : The map sites/default/files/imagecache/... is created is shown» Message : The map sites/default/files/imagecache/... has been created is shown

#2

drewish - April 29, 2009 - 15:26
Title:Message : The map sites/default/files/imagecache/... has been created is shown» Don't show preset create directory messages to anonymous users
Category:bug report» feature request

Well it's not an error message so that setting wouldn't be honored but it doesn't really make sense to show that to users.

#3

drewish - April 29, 2009 - 15:31

Humm... that's actually a side effect of using core's file_check_directory() to create the directories... I want to keep using that since it's got a bunch of useful checks in there. Maybe we could do some hackery to remove the message.

#4

edde42 - May 2, 2009 - 03:28

Subscribing. Working on a site that will be released soon, so I hope you find a solution in a not so distant future :)

#5

paganwinter - May 14, 2009 - 07:24

Subscribing...

#6

askibinski - May 16, 2009 - 15:41

Subscribing.

Until this is properly patched, I guess a quick workaround could be to check the $messages variable in the theme layer for any occurence of the word 'imagecache' in which case you wouldn't show the $messages at all. (But this would also prevent any addditonal messages being possibly displayed at that time)

#7

jhedstrom - May 27, 2009 - 16:38

Subscribing.

#8

drewish - May 27, 2009 - 16:44

jhedstrom, i saw your user name in the email and was thinking to myself "sweet, he'll have posted a patch and i can just put this issue to rest". now i'm disappointed, get on it! ;)

#9

jhedstrom - May 27, 2009 - 17:19
Status:active» needs review

Since the issue is with file_check_directory, a hack is the only way around, and the only one I could think of was to flush all messages. This should be okay though since other messages shouldn't be added during this callback...but it's still a hack. Perhaps it would be less of a hack if it checked only for anonymous users...

AttachmentSize
imagecache.446634.patch 446 bytes

#10

donquixote - June 4, 2009 - 11:24

subscribe

#11

bonked - June 17, 2009 - 18:24

Subscribe.

#12

asak - July 12, 2009 - 22:49

subscribing (and using patch #9 for now...)

#13

drewish - August 19, 2009 - 18:50

#14

yang_yi_cn - September 25, 2009 - 22:53

Subscribing.

 
 

Drupal is a registered trademark of Dries Buytaert.