Review main Merged

49798[BUGFIX] Do not turn storages automatically offline

Sascha Egerer CR +2 V +2 Normal +29 −43 updated 10/12/16, 19:07

Commit message

Storages should not be taken offline automatically.
Currently the storage turns offline if a configuration error is
detected.
But depending on the driver a configuration error can be a temporary
problem that just exists for seconds (like local filemount is
not available).

A storage should only be turned offline if you are in the backend
context
and the initialization fails.

Review

  • Code review CR +2
    • Benni Mack +2
    • Stefan Neufeind +1
    • Frans Saris +1
  • Verified V +2
    • Sascha Egerer +2
    • Stefan Neufeind +1
    • Frans Saris +1
    • TYPO3com +1 CI

Issues 1

Files 1

Review log 2731

Show 56 earlier messages
  1. Sascha Egerer uploaded patch set 1 09/02/16, 20:55

  2. Sascha Egerer updated the commit message in patch set 2 09/02/16, 20:56

  3. Sascha Egerer wrote 09/02/16, 20:56

    Topic set to fal
  4. Sascha Egerer uploaded patch set 3 09/03/16, 12:49

  5. TYPO3com voted on patch set 3 V -1 09/03/16, 12:52 Completed build in 03m 18s on Sat, 3 Sep, 02:52 PM Test Summary: 18506 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2886

  6. Sascha Egerer uploaded patch set 4 09/03/16, 12:59

  1. TYPO3com voted on patch set 4 V +1 09/03/16, 13:02 Completed build in 02m 54s on Sat, 3 Sep, 03:02 PM Test Summary: 18506 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2889

  2. Frans Saris uploaded patch set 5 09/03/16, 13:17

  3. Frans Saris voted on patch set 5 CR +1 V +1 09/03/16, 13:17

  4. TYPO3com voted on patch set 5 V +1 09/03/16, 13:20 Completed build in 03m 05s on Sat, 3 Sep, 03:20 PM Test Summary: 18506 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2892

  5. Sascha Egerer commented on patch set 5 09/03/16, 14:38

    ResourceStorage.php:204

    hm that should also work with that sprintf. public function error($message, array $data = [])
  6. Sascha Egerer uploaded patch set 6 09/03/16, 14:43

  7. TYPO3com voted on patch set 6 V +1 09/03/16, 14:46 Completed build in 03m 09s on Sat, 3 Sep, 04:46 PM Test Summary: 18506 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-2915

  8. Frans Saris voted on patch set 6 CR +1 V +1 09/03/16, 15:56

  9. Benni Mack voted on patch set 6 CR +2 09/19/16, 05:43

  10. Stefan Neufeind voted on patch set 6 CR +1 V +1 09/19/16, 07:55

  11. Sascha Egerer voted on patch set 6 V +2 09/20/16, 06:29

  12. Gerrit merged patch set 6 09/20/16, 06:29

  13. Łukasz Uznański commented on patch set 7 10/06/16, 15:10

    If I change fileadmin folder name to something else, file storage goes offline even with this patch, is this way how it should work ?
  14. Frans Saris commented on patch set 7 10/06/16, 16:46

    That is correct. When storage is unavailable and your logged in into the back end the storage is marked offline
  15. Helmut Hummel commented on patch set 7 10/11/16, 12:08

    Post -1 by testing. I just ran into troubles because storages that are explicitly marked as offline manually, are still considered to be online after this patch. I don't think this is a good idea. My issue to reproduce: * Create an additional storage with invalid root folder * Mark it as offline * set config.absRefPrefix to "auto" or "/" * observe the weird replacement being done in HTML code in method \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::setAbsRefPrefix $folder is null, thus every quote (") is replaced with a quote and a slash ("/) which effectively breaks HTML output
  16. Helmut Hummel commented on patch set 7 10/11/16, 12:11

    ResourceStorage.php:377

    This is the main issue here. With this change it is impossible to mark storages as offline for the frontend, which results in at least one weird bug, but has potentially more implications
  17. Sascha Egerer commented on patch set 7 10/11/16, 12:15

    ResourceStorage.php:377 Reply

    If i remember correctly this is the expected bevahior. Storage should always be marked as online in the frontend. Maybe Frans can say something about it?
  18. Helmut Hummel commented on patch set 7 10/11/16, 12:18

    ResourceStorage.php:377 Reply

    Pretending a (broken) and offline storage to be online caused at least one bug for me in conjunction with absRefPrefix. We could fix the absRefPrefix now, but I wonder how many other bugs are still hidden.
  19. Frans Saris commented on patch set 7 10/11/16, 21:45

    ResourceStorage.php:377 Reply

    @Sascha I think we missed next part somehow. In old code only the "check" was skipped in FE if record wasn't set online. // the storage is not marked as online for a longer time if ($this->storageRecord['is_online'] == 0) { $this->isOnline = false; }
  20. Helmut Hummel commented on patch set 7 10/12/16, 10:24

    ResourceStorage.php:423

    oh, and this is public API being removed, right?
  21. Helmut Hummel commented on patch set 7 10/12/16, 10:31

    ResourceStorage.php:376

    This also means that storages are always online on cli, ajax and install tool requests. On purpose?
  22. Helmut Hummel commented on patch set 7 10/12/16, 10:36

    Reverted This patchset was reverted in change: I6d51d9cb64e241bc8e7e354bc271ed89649f0e13
  23. Frans Saris commented on patch set 7 10/12/16, 15:20

    I'm fine with reverting this change. But then we should at least create a new version that removes the automatic persistence off online =0 as it doesn't make sense to disable a storage by a hickup in the connection. That would be the same as removing the db connection if there was a hickup there. The clean up that was added to this patch should be moved to a different issue/patch
  24. Helmut Hummel commented on patch set 7 10/12/16, 18:24

    @Frans: since you seem to have insight in what you expect, yes please propose a change with less impact. I tried but failed to do so, because I could not distinguish between wanted and accidental change by just reading the code. That is why it was easier and safer for me to revert.
  25. Frans Saris commented on patch set 7 10/12/16, 19:07

    Will try to find some time to look at it during the next days