Closed (outdated)
Project:
Feeds
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
12 Oct 2019 at 02:56 UTC
Updated:
9 Feb 2026 at 19:33 UTC
Jump to comment: Most recent
This issue is similar to https://www.drupal.org/project/feeds/issues/3043378, but rather than trying to fix the file size comparison, I'm only looking to suppress the errors.
Here's an example of the errors I'm seeing flooding my logs:
filesize(): stat failed for public://meetings/agendas/Executive_Board_16-05-23.pdf [warning]
Patch attached for review.
| Comment | File | Size | Author |
|---|---|---|---|
| feeds-prevent_php_warning.patch | 644 bytes | jenlampton |
Comments
Comment #2
joelpittetHey @jenlampton!
The only other module that I know actively suppresses the output of this function is advagg, most don't. Is this a streamwrapper issue for a filesystem like s3? ... or do you have more context?
Comment #3
jenlampton@joelpittet No S3. For my site the files are saved on disk as usual, but the
filesize()command is being run on remote files (before they are imported via feeds) and sometimes my source feed has URLs that can't be trusted. I often get 404 errors instead of documents. I would prefer my log not get flooded with errors I can't prevent. :)Comment #4
megachriz@jenlampton
Are you using either the option “Replace only if different” or “Rename only if different”? These options are not compatible when the file to import is remote. This is noted on the target configuration form:
So if you are indeed using one of these options, I believe they have no benefit compared to the “Replace” or “Rename” option when importing files from a remote location. In that case, your issue would also be fixed when using either the “Replace” or “Rename” option.
Or is there a situation where the
filesize()function does work on remote files? In that case it would make sense to suppress the warnings.Comment #5
bluegeek9 commentedDrupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.
If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.
If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!