Project

General

Profile

Actions

Bug #79301

closed

GIFBUILDER generates too long file names

Added by Thomas Oliver Moll almost 8 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2017-01-12
Due date:
% Done:

100%

Estimated time:
0.10 h
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
no-brainer
Is Regression:
Yes
Sprint Focus:

Description

Hi,

in commit [[https://github.com/TYPO3/TYPO3.CMS/commit/94e915fee3db6df4c43418d378101b400a113b69]] the generation for GIFBUILDER filenames was changed.

The Comment states, that the filePrefix should be limited to 100 characters.
The review [[https://review.typo3.org/#/c/34015/]] notices this but wants the comment to be removed.

I have a complicated GIFBULDER setup with lots of layers that are turned on and of by if statements.
Even the switched-off layers get serialized and produce a really long filename that can not be handled.

A simple modification of fileName() in GifBuilder.php does the Trick:

  public function fileName($pre)
    {
        /** @var $basicFileFunctions \TYPO3\CMS\Core\Utility\File\BasicFileUtility */
        $basicFileFunctions = GeneralUtility::makeInstance(BasicFileUtility::class);
        $filePrefix = implode('_', array_merge($this->combinedTextStrings, $this->combinedFileNames));
        $filePrefix = $basicFileFunctions->cleanFileName($filePrefix);

        /* shorten Prefix to avoid too long filenames */
        $filePrefix = substr($filePrefix,0,100);

        return $this->tempPath . $pre . $filePrefix . '_' . GeneralUtility::shortMD5(serialize($this->setup)) . '.' . $this->extension();
    }

IMHO, there should be an Option to set the Filename via TS. Or better to choose the filestore where it is stored.
I have TYPO3s with many websites in it. For every site there is a filestore. But when I annotate images via GIFBUILDER all the Images go into one directory (typo3temp) and not to the _processed folder of the filestore of the imagage that is annotated.

Actions #1

Updated by Thomas Oliver Moll almost 8 years ago

This problem exists not only in TYPO3 7.6, it seems to be present as well in the GIT Master branch

Actions #2

Updated by Markus Klein almost 8 years ago

Please push a change-request to our review system.

If you need help with that, checkout the https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/

Actions #3

Updated by Gerrit Code Review almost 8 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51305

Actions #4

Updated by Thomas Oliver Moll almost 8 years ago

Ok... pushing this to git was a pin in the a**... and the documentation barely helped.
But I think, I did it:
[[https://review.typo3.org/#/c/51305/]]

I pushed this to the HEAD. I there something left to do to get this into 7.6?

Actions #5

Updated by Markus Klein almost 8 years ago

Thanks.

What have been your major obstacles with the documentation? What can be improved?
We are always looking out for feedback and this area. Maybe consider improving the guide directly via github pull-request.

Actions #6

Updated by Gerrit Code Review almost 8 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51305

Actions #7

Updated by Gerrit Code Review almost 8 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51305

Actions #8

Updated by Gerrit Code Review almost 8 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51305

Actions #9

Updated by Thomas Oliver Moll almost 8 years ago

Markus Klein wrote:

Thanks.

What have been your major obstacles with the documentation? What can be improved?
We are always looking out for feedback and this area. Maybe consider improving the guide directly via github pull-request.

The main problem was me being not familiar with git or today beeing Friday 13th.
Things that went wrong and took a lot of googleing to solve and general questions I had:

  • I want to push a patch to HEAD and 7.6 what should I clone?
  • in user.name: Should i use my login or real name?
    - ok, should have used realname, I know that now
  • connection to repository is done by pubkey not by password
  • [[https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/GitSetup/Index.html]] does not mention gerrit
  • in gerrit i was told to use ssh-keygen but it was necessary to use ssh-add to "add the new identity" (ssh debug logs are not for the faint of heart)
  • The example commit message on [[https://docs.typo3.org/typo3cms/ContributionWorkflowGuide/GitSetup/CommitMessageFormat.html#commit-message-format]] includes the Line
    "Change-Id: I<some string generated by the git commit-msg hook>"
    Only later I found the additional explanation that this Line may not be included by myself, if I want to have it generated by the hook.
    I thought the <> are used by the hook to insert the ID there
  • I accidentally executed the unmodified command
    "git config url."ssh://<YOUR_TYPO3_USERNAME>@review.typo3.org:29418".pushInsteadOf git://git.typo3.org"
    without inserting my username. A second call of this command added the correct line to the config but left the incorrect one in the config so I still had the "permission denied" error message. I had to edit the config by hand.

So, you see... many minor things and mistakes that where completely logical AFTERWARDS but piled up for a noob like me ;-)

but thanks for the help with the review.

Actions #10

Updated by Markus Klein almost 8 years ago

Thanks for the long listing. Indeed some points seem to need clarification!

In general, are you aware of the TYPO3 Slack channels?
It's my fault not to have pointed you there as well, but maybe it would have been less frustrating for you, if you received direct help there.
https://forger.typo3.org/slack

Nevertheless, thanks for hanging on and thanks for being a new contributor to the Core!

Actions #11

Updated by Gerrit Code Review almost 8 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51305

Actions #12

Updated by Gerrit Code Review almost 8 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/51675

Actions #13

Updated by Thomas Oliver Moll almost 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #14

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF