Comments

nedjo’s picture

The error on that page seems to result from a release record being present when the file is not. I vaguely thought that the cron-called directory scanning took care of that, pseudo-'deleting' unavailable releases. In any case, I guess we should test for the existance of a release file before trying to determine its size.

nedjo’s picture

Title: http://drupal.org/project/locale » filesize() generates error when file not present
dww’s picture

Status: Active » Postponed

thanks for the investigation and more useful info, nedjo -- killes's report was awfully terse... ;)

that said, i'm fairly uninterested in spending much effort fixing this since:

therefore, i'm marking this as postponed -- basically, let's not worry about it until the re-write of all the project-release handling, and then the problem will basically go away. ;)

sound good?
-derek

nedjo’s picture

Sounds good.

dww’s picture

Version: 4.7.x-1.x-dev » 4.7.x-2.x-dev
Status: Postponed » Active

actually, this is still potentially a problem, even with the new release system. :( i've considered just storing the filesize in the DB, along with the file date and md5hash (which we do already). if we're going to store those, seems kinda silly not to just store the filesize, too. this would also vastly speed things up where we're showing lots of releases on the same page.

dww’s picture

Status: Active » Fixed

This was fixed over at http://drupal.org/node/105224

Anonymous’s picture

Status: Fixed » Closed (fixed)
dww’s picture

Version: 4.7.x-2.x-dev » 6.x-1.x-dev
Component: Projects » Releases
Status: Closed (fixed) » Active

This is still broken in cases where you have a file_path but no file (e.g. the d.o testing install profile) and it's driving me nuts. Furthermore, I think it's going to be important for #357926: Port project_release to views2 to have the filesize in the DB so we can include that in the various views involving release nodes. Either way, it seems like caching the filesize in the DB instead of touching the filesystem all the time is going to be a big performance optimization.

Therefore, we should add a "file_size" column to the {project_release_nodes} table and populate that during either file upload or in the packaging script, depending on how the file_path itself is set (which currently depends on if cvs is enabled for a given project). We'll also need a DB update to find the filesizes for all existing release nodes (can you say "batch"?).

dww’s picture

Status: Active » Fixed

This is now fixed via storing all release files in the {files} table and the new {project_release_file} table from #357920: Numerous errors when previewing/submitting a new release node. Includes a DB update to populate filesize for all files.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.