Skip to content

File field download on detail page not working when using TranslatableTabToRowTrait #41

@Rinze-Smits

Description

@Rinze-Smits

I have a translatable File field showing on a detail page. The resource uses TranslatableTabToRowTrait. When I try to download the file an error is returned.

I have found the error to be caused by the download being passed to the regular Nova FieldDownloadController (because the field isn't copied with the locale appended in the handler as would happen without TranslatableTabToRowTrait) and the regular FieldDownloadController gets a list of all downloadableFields by checking which fields from availableFieldsOnIndexOrDetail() implement the Downloadable contract. The file field is not in that list.

To fix I suggest also implementing availableFieldsOnIndexOrDetail() or the methods it calls in TranslatableTabToRowTrait.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions