Same-named files in different upload directories report zero Grid usage
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Start by reproducing with two top-level files that share a basename in different upload locations, then run php system/ee/eecli.php sync:file-usage and inspect the rows in exp_files (file_id, upload_location_id, file_name), the raw values in exp_channel_grid_field_*, and exp_file_usage. Find where the rebuild's lookup by upload_location_id and file_name returns no match, since the issue says the grouping should already separate these files. Done means each file gets the correct (file_id, entry_id) usage row, with a test covering two same-named top-level files.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description of the problem
Two files with the same basename, stored at the top level of two different upload directories and referenced from a Grid, have both been reported with a usage count of zero.
These should be independent file records with unique file_id values. Legacy-style references also include the upload-location ID, for example {filedir_1}image.jpg and {filedir_2}image.jpg, so the shared basename should not make the references ambiguous.
This is being reported separately from the multiple-File-column Grid rebuild defect so the duplicate-name/upload-directory behavior can be reproduced and diagnosed independently.
How To Reproduce
- Create two upload directories.
- Upload a file named
image.jpgat the top level of each directory. Confirm that the files have differentfile_idvalues. - Create a Grid containing a single native File column. Using only one File column avoids the separate multi-column accumulation issue.
- Reference the first
image.jpgfrom one entry and the secondimage.jpgfrom another entry. - Save both entries.
- Run Developer > Utilities > Update File Usage (or run
php system/ee/eecli.php sync:file-usage). - View the usage count/details for each file.
Reported result: both files show zero usage.
Expected result: each file is resolved by its unique file ID/upload location and shows the entry that references it.
Error Messages
No error is displayed. Both usage counts remain zero.
Screenshots / Videos / Template Code
Not currently available.
Environment Details:
- Version: ExpressionEngine 7; exact installed patch version pending confirmation
- PHP Version: pending confirmation
- MySQL Version: pending confirmation
- OS: pending confirmation
- Web Server: pending confirmation
Possible Solution
First confirm the raw Grid cell values and corresponding database records:
exp_files.file_idexp_files.upload_location_idexp_files.file_name- the value stored in
exp_channel_grid_field_* - matching rows, if any, in
exp_file_usage
The current rebuild query groups each lookup by both upload_location_id and file_name, so two top-level files in different upload locations should be distinguishable. If both still resolve to zero, the failure likely occurs before or after filename matching rather than being a simple basename collision.
Coverage should use two top-level files with the same basename in different upload destinations and assert that each produces the correct (file_id, entry_id) relationship.
Additional context
This report intentionally excludes subfolders. Files located in subfolders exercise different path-resolution logic and should be investigated separately if needed.
- Lenguaje dominante
- PHP
- Estrellas
- 505
- Forks
- 135
- Merge medio
- 3 d 7 h
- PR fusionados (30 d)
- 7
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ExpressionEngine/ExpressionEngine
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
ExpressionEngine/ExpressionEngine#5453 ·
Los mantenedores suelen responder en 1 día
-
RTE Custom Stylesheet causes warning: Trying to access array offset on value of type boolPosiblemente ocupada @Yulyaswan la tomó hace 10 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ExpressionEngine/ExpressionEngine#5406 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
ExpressionEngine/ExpressionEngine#5381 ·
Los mantenedores suelen responder en 1 día
-
Bug: Accepted
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
ExpressionEngine/ExpressionEngine#5117 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
ExpressionEngine/ExpressionEngine#5066 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de ExpressionEngine/ExpressionEngine
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Automattic/blocks-engine#4621 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
YunoHost-Apps/snappymail_ynh#205 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
Automattic/static-site-importer#2653 ·
Los mantenedores suelen responder en 1 día
-
Bug (unconfirmed) Search :mag:
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
FreshRSS/FreshRSS#9533 · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
🏁 status: ready for work 💻 aspect: code 🛠 goal: fix 🟨 priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100