Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It took me some time to debug it the errors I got when trying to save a feed. logging it here for the records:
# warning: fopen(/c7add89e4e38ae2bc5ac48059c4907bb) [function.fopen]: failed to open stream: Permission denied in .../sites/all/modules/feedapi/parser_common_syndication/parser_common_syndication.inc on line 69.
# warning: fwrite(): supplied argument is not a valid stream resource in .../sites/all/modules/feedapi/parser_common_syndication/parser_common_syndication.inc on line 70.
# warning: fclose(): supplied argument is not a valid stream resource in .../sites/all/modules/feedapi/parser_common_syndication/parser_common_syndication.inc on line 71.
It comes the from following function:
function _parser_common_syndication_sanitize_cache() {
$cache_location = file_directory_path() .'/parser_common_syndication_cache';
if (!is_writeable($cache_location) || !is_dir($cache_location)) {
$cache_location = file_create_path($cache_location);
if (!file_exists($cache_location) && is_writable(file_directory_path())) {
mkdir($cache_location);
}
if (!is_writeable($cache_location)) {
return FALSE;
}
}
return $cache_location;
}
in my case, the directory sites/madrc/files/parser_common_syndication_cache
existed, but the cache path parser_common_syndication_cache/c7add89e4e38ae2bc5ac48059c4907bb
was not writeable, so the function above returned FALSE. Instead it should either throw an drupal_message error or the callers should be able to deal with the case where FALSE is returned. Currently, it silently fails and Drupal tries to write to /c7add89e4e38ae2bc5ac48059c4907bb.
Comments
Comment #1
mikeytown2 CreditAttribution: mikeytown2 commentedsubscribe