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
#2
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
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
Subscribing. Working on a site that will be released soon, so I hope you find a solution in a not so distant future :)
#5
Subscribing...
#6
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
Subscribing.
#8
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
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...
#10
subscribe
#11
Subscribe.
#12
subscribing (and using patch #9 for now...)
#13
marked #545068: How to remove "xxx directory was created" message from anonymous user? as a duplicate.
#14
Subscribing.