andersundsehr / aus_driver_amazon_s3

Provides a TYPO3 FAL driver for the Amazon Web Service S3
GNU Lesser General Public License v3.0
20 stars 39 forks source link

cant delete files anymore after update to typo3 8.7.16 #36

Closed dni closed 5 years ago

dni commented 6 years ago

seems like something in TYPO3 changed, which results in a stuck when trying to delete a file. may have something todo with this https://review.typo3.org/#/c/57052/. anyone with a similar issue?

dni commented 6 years ago

Fatal error: Maximum execution time of 240 seconds exceeded in /var/www/dummy/typo3conf/ext/aus_driver_amazon_s3/Classes/Driver/AmazonS3Driver.php on line 1418 https://github.com/andersundsehr/aus_driver_amazon_s3/blob/master/Classes/Driver/AmazonS3Driver.php#L1418

dni commented 6 years ago

line 1418 doesnt seem to be the issue the first time, because if i die after 1418 it get hit instant.

dni commented 6 years ago

renaming is also not working, im pretty stuck now with my debugging skills

dni commented 6 years ago

OK renaming is working in subdirectoriy not in the root directory.

dni commented 6 years ago

i tested it again with 8.7.15, its a 8.7.16 exclusive behaviour!

dni commented 6 years ago

using this file from 8.7.15 instead of the file from 8.7.16 fixes the errors.

typo3/sysext/core/Classes/Resource/ResourceStorage.php

dni commented 6 years ago

ok i think i found it, it my opinion its a core bug, ill submit a issue and a fix for it, and the error should be done, when deleting, still found no solution for why the rename on the root folder isnt working.

dni commented 6 years ago

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1329647780: Object with identifier "2:" does not exist in storage | TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException thrown in file /srv/typo3_src-8.7.15/typo3/sysext/core/Classes/Resource/ResourceFactory.php in line 565. Requested URL: /typo3/index.php?ajaxID=%2Fajax%2Ffile%2Fexists&ajaxToken=--AnonymizedToken--&fileName=__RG_0744044441.PDF&fileTarget=2%3A&=1528805716265

seems like the fileTarget= isnt posted correctly

dni commented 6 years ago

<input name="file[rename][0][destination]" value="2:" type="hidden"> should be <input name="file[rename][0][destination]" value="2:/" type="hidden">

for the root-directory, starting to think this is also a corebug

dni commented 6 years ago

ok changing this function in the driver solves the problem, and the next typo3 update it will be fixed too.

/**
    * @param string &$identifier
    */
   protected function normalizeIdentifier(&$identifier)
   {
       $identifier = str_replace('//', '/', $identifier);
       if ($identifier !== '/') {
           $identifier = ltrim($identifier, '/');
       }
   }
BastianBalthasarBux commented 5 years ago

Can confirm issue and solution by changing normalizeIdentifier in class Driver.

I want to add, it seems, recycler folder is not supported by the driver. But that's a seperate issue.

c0defre4k commented 5 years ago

Any updates on when this issue will be solved? I saw that there is already an PR #37

Lagerregal commented 5 years ago

Fixed with this commit (Jun 13, 2018): https://github.com/andersundsehr/aus_driver_amazon_s3/commit/2843147b1df1bb749611649f8196bf9680a7edab