Review main Abandoned

18460[FEATURE] filelist: make using file_reference possible

Stefan Neufeind CR 0 V 0 Easy +20 −4 updated 10/14/13, 12:18

Commit message

default-TCA has field 'media' with 'internal_type' set
to 'file'. Files in 'media' will then be without path,
relative to the 'uploadfolder'.

Allow filenames to optionally have a path. This happens
for example when using 'file_reference' instead with
a custom TCA.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 14

  1. Stefan Neufeind commented on patch set 1 05/27/13, 17:19

    How to test: * Use a small extension with ext_tables.php containing the following lines: t3lib_div::loadTCA('tt_content'); $GLOBALS['TCA']['tt_content']['columns']['media']['config']['internal_type'] = 'file_reference'; $GLOBALS['TCA']['tt_content']['columns']['media']['config']['uploadfolder'] = ''; * Create an element of type uploads ("File Links") and add a file from (for example) fileadmin/... to it. * Notice that files are no longer copied to uploads/media/ but instead are a reference to the file. Then check the Filelist in the frontend. File is correctly found, filesize can be displayed and just the filename without a path is shown as link-text. Since this adjustment is only necessary with custom TCA imho this is a "feature" and as such not to be backported.
  2. Stefan Neufeind uploaded patch set 2 05/27/13, 17:19

  3. Stefan Neufeind commented on patch set 2 05/27/13, 17:19

    For multiple files (of type file_reference) to show correctly the patch needed an adjustment: rescue the $path (in $basePath now)
  4. Stefan Neufeind commented on patch set 2 05/27/13, 17:19

    Fails Thanks for pointing that out. You are of course right. This was originally done against 4.5 and I just "hand-rebased" the patch to master. Didn't take FAL into account. Since it's a minor thing imho, could we get this into 4.5 and 4.7? It's just "enabling to use file_reference". If you you don't (core by default) everything is fine.
  5. Stefan Neufeind commented on patch set 2 05/27/13, 17:19

    Would appreciate some reviews on this, please. Not a big change imho.
  6. Stefan Neufeind commented on patch set 2 05/27/13, 17:19

    But it's unfortunately not something that could be solved with just configuration. Hmm ...
  7. Stefan Neufeind commented on patch set 2 05/27/13, 17:19

    ping!
  8. Christian Kuhn commented on patch set 2 05/27/13, 17:19

    Fails Unable to reproduce on current master (with fal?)
  9. Christian Kuhn commented on patch set 2 05/27/13, 17:19

    Regarding 4.7 / 4.5: Since this is a seldom case (imho) that is only raised if someone actually changes the TCA of this specific columns to file_reference (btw: is this already supported in 4.5?) and this "only" affects the file content element ... i tend to *not* fix this issue for 4.5 / 4.7 anymore. This is just not a "hard" error.
  10. Mr. Jenkins commented on patch set 1 05/27/13, 17:19

  11. Mr. Jenkins commented on patch set 2 05/27/13, 17:19

  12. Wouter Wolters commented on patch set 1 05/27/13, 17:19

    (1 inline comment) Will test it soon

    CssStyledContentController.php:320

    Trailing whitespace
  13. Wouter Wolters commented on patch set 2 05/27/13, 17:19

    Looks good to me, but someone else must approve
  14. Stefan Neufeind abandoned the change 10/14/13, 12:18

    Won't have / not relevant for 6.x (because of FAL). And we decided to not add this for 4.5/4.7 anymore.