Review main Merged

38889[BUGFIX] Adhere absRefPrefix for storages

Markus Klein CR +2 V +2 Easy +14 −5 updated 05/05/15, 16:30

Commit message

If plain images from local storages are rendered to FE,
absRefPrefix will now be applied correctly.

Review

  • Code review CR +2
    • Markus Klein +2
    • Jan Helke +1
    • Benni Mack +1
  • Verified V +2
    • Markus Klein +2
    • Jan Helke +1
    • Benni Mack +1

Issues 1

Files 2

Review log 11

  1. Markus Klein uploaded patch set 1 04/23/15, 22:46

  2. Benni Mack commented on patch set 1 04/24/15, 06:35

    personally, I consider this a change that should be handled only for 7. I had the problem on most of my 6.x installations and we always managed to use the additionalAbsRefPrefix directories path for that - so that's no real problem so far, rather bringing one more SQL query with it on every request. Additionally, we could make the change (if 7-only) to remove the "filadminDir" option completely.
  3. Markus Klein commented on patch set 1 04/24/15, 10:42

    To be honest: I did even know about the additionalAbsRefPrefix option until I debugged that code. And I would have never expected that I need to add additional configuration for each storage. I mean that's just dumb redundancy, for no win. 1 SQL query is matter of nothing if you compare what is going on for caches. Besides that, the storages are fully cached in memory, so no SQL involved at all. I agree the fileadminDir thing has to die, but not with this patch please.
  4. Benni Mack commented on patch set 1 CR +1 V +1 04/28/15, 21:23

    fine for now. I will mark the deprecation of the option as a todo for myself.
  5. Jan Helke voted on patch set 1 CR +1 V +1 04/30/15, 10:57

  6. Markus Klein voted on patch set 1 CR +2 V +2 04/30/15, 12:00

  7. Markus Klein merged patch set 1 04/30/15, 12:00

  8. Philipp Gampe commented on patch set 2 04/30/15, 16:20

    Post -1

    TypoScriptFrontendController.php:3970

    Misconception here ... getDriverType returns driver identifier and not the "type". There can be any number of "local" drivers that extend the LocalDriver, but have a different identifier and thus "type".
  9. Markus Klein commented on patch set 2 04/30/15, 17:16

    TypoScriptFrontendController.php:3970 Reply

    Then the misconception is the getDriverType() function and not this code here. If I want the identifier I'd call getDriverIdentifier... And see it as a first step, it now at least works for local storages using the default localdriver, which is the 98% usecase. Once we get FAL straight here, we can adjust.
  10. Frans Saris commented on patch set 2 04/30/15, 18:19

    TypoScriptFrontendController.php:3970 Reply

    Maybe it is safer to check if $folder is a valid URL. If it isn't a url you can assume it is a local folder and can be used for the replace stuff
  11. Philipp Gampe commented on patch set 2 05/05/15, 16:30

    TypoScriptFrontendController.php:3970 Reply

    I know people who extend the local driver to add their own adjustments and then got hit by the $storage->getDriverType() === 'Local' parts in the core, effectively forcing them to replace the local driver altogether instead of just registering another driver and doing the conditions inside the driver. This is just so broken by design.