Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metadata extraction fails on file upload #33

Open
rtp-cgs opened this issue Jan 28, 2021 · 2 comments
Open

Metadata extraction fails on file upload #33

rtp-cgs opened this issue Jan 28, 2021 · 2 comments

Comments

@rtp-cgs
Copy link

rtp-cgs commented Jan 28, 2021

Dear Xavier,

Some of the times when I upload a file in the Filelist module the metadata extraction does not work. The issue seems to be related the fields tstamp and crdate sometimes at the point of the extraction the tstamp value is 1 bigger than the crdate and therefore the metadata is ignored. See: Classes/Service/Extraction/AbstractExtractionService.php:162

The uploaded file does not seem to make any difference, there have been both successful and failed extractions with the same file. We are using a Typo3 9.5.23 non-composer installation and the ext:extractor version 2.1.0. If you need any more information about the setup please let me know.

If you have any idea/hint what we might be doing wrong we would appreciate.

Best Regards,
Cyrill

@sypets
Copy link
Contributor

sypets commented Jun 14, 2023

I noticed this too. As far as I can tell this is intentional but may not always work as intended.

While testing, for some of the files crdate=tstamp after upload (I deactived automatic metadata abstraction). Sometimes it is not, I am not really sure why.

The extension will refuse to extract if sys_file_metadata crdate != tstamp. This is a work-around for a core bug:

with change, see AbstractService::canProcess()

@DecideGmbH
Copy link

DecideGmbH commented Mar 13, 2024

Today I ran into the same problem and debugged my way through the extension until I found this flaw.
I coded my way around it by not checking if the crdate and tstamp are the same, but if there are more 3 seconds between them.
In my opinion, that's enough, to not have changed the data by hand.
This working for me so far.
Is there any chance to get this change into this extension?

\typo3conf\ext\extractor\Classes\Service\Extraction\AbstractExtractionService.php
Line: 162
// if (!empty($metadata) && $metadata['crdate'] !== $metadata['tstamp']) {
if (!empty($metadata) && $metadata['tstamp'] > ((int)$metadata['crdate'] + 3)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants