Closed (fixed)
Project:
Storm
Version:
6.x-2.x-dev
Component:
Storm.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
1 Nov 2011 at 16:20 UTC
Updated:
2 Dec 2011 at 22:40 UTC
Jump to comment: Most recent file
Works fine if I activate only the storm check box in admin/build/modules. All run into a mess when I activate the “Storm project” feature.
The http://site/storm display WSOD and watchdog sort bunch of pages with error “readdir() expects parameter 1 to be resource, boolean given in /home/ronline/www/sites/all/modules/storm/storm.module on line 80”
I can't tell how many of them I've counted only the first nine pages.
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | storm--icons-2.patch | 2.35 KB | juliangb |
| #8 | check_icon_directory-1328480-8.patch | 2.42 KB | kfritsche |
| #4 | check_icon_directory-1328480-4.patch | 2.36 KB | kfritsche |
Comments
Comment #1
juliangb commentedWhat value is assigned to the variable
storm_icons_path?Comment #2
ronline commentedThe storm_icons_path was “sites/default/modules/storm/icons” while the storm module is in “sites/all/modules/storm/” . I've changed the path to “sites/all/modules/storm/icons” and problem has gone. Thx for the help Julian !
Comment #3
juliangb commentedGreat to hear.
I'm changing this issue now to a task that tries to prevent the occurrence - I think we should check that the directory exists when you change this in the settings form.
It might also be worth checking for this when we try to read the directory - and providing a more useful error message.
Comment #4
kfritscheHere comes a patch for this issue.
Adds a validate function for the admin setting and uses file_scan_directory from drupal, instead of doing this self. This function checks, if the directory exists.
Comment #5
kfritscheset to 'needs review' for testbot.
Comment #6
juliangb commentedSurely this isn't checking whether the path has changed - only if it is different to the default setting?
Comment #7
kfritscheWhy not?
variable_get gets the last entered icon path (if not set, the default) and in the form_values is the new typed in path.
if this new path is not a directory, it sets an error.
But the recache must to be moved in a submit function, because a recache there, uses the old path...
Comment #8
kfritscheNew Patch.
Removed recache in validation, but delete the cache, so the next time it will be rebuild with the new path.
Comment #9
juliangb commentedMy mistake. I read the default value and missed the variable_get.
Comment #10
juliangb commentedReviewed and tested.
I've attached an amended patch - two small changes
- One trailing white space removed
- Error message slightly amended
Comment #11
juliangb commentedCommitted to 2.x.