Project

General

Profile

Actions

Bug #67533

closed

Legacy uploadfolder does not work correct in workspaces

Added by Kurt Gusbeth almost 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2015-06-17
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

When I use the workspace with my extension, I get an error message when I select an image or a relation-element:

1: The destination (/var/www/html/xyz/uploads/tx_myquizpoll) or the source file (/var/www/html/xyz/uploads/tx_myquizpoll/2563) does not exist. (tx_myquizpoll_question:484:image)

Or:
"router: router
Element "tx_myquizpoll_category:197" does not exist" 

When I select a template-file (via flexform) there is a similar problem: the FAL-number is not replaced by the path to the template. See image.
This problems occurs only when I use the workspace.
This is the configuration for the db-table:

$TCA['tx_myquizpoll_question'] = array (
    'ctrl' => array (
        'title'     => 'LLL:EXT:myquizpoll/locallang_db.xml:tx_myquizpoll_question',        
        'label'     => 'title',    
        'tstamp'    => 'tstamp',
        'crdate'    => 'crdate',
        'cruser_id' => 'cruser_id',
        'versioningWS' => TRUE, 
        'origUid' => 't3_origuid',
        'languageField'            => 'sys_language_uid',    
        'transOrigPointerField'    => 'l10n_parent',    
        'transOrigDiffSourceField' => 'l10n_diffsource',    
        'sortby' => 'sorting',    
        'delete' => 'deleted',    
        'enablecolumns' => array (        
            'disabled' => 'hidden',    
            'fe_group' => 'fe_group',
        ),
        'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY).'tca.php',
        'iconfile'          => t3lib_extMgm::extRelPath($_EXTKEY).'icon_tx_myquizpoll_question.gif',
    ),
);

What can I do?


Files

files.png (5.63 KB) files.png Kurt Gusbeth, 2015-06-17 08:33
select-file.png (3.03 KB) select-file.png Kurt Gusbeth, 2015-10-21 09:45
select-image.png (8.88 KB) select-image.png Kurt Gusbeth, 2015-10-21 09:45

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #67676: Element "sys_file_reference:XXX" does not exist"ClosedOliver Hader2015-06-22

Actions
Actions #1

Updated by Wouter Wolters over 8 years ago

  • Status changed from New to Needs Feedback

Can you retry this with latest TYPO3 CMS 6.2 version?

Updated by Kurt Gusbeth over 8 years ago

I used TYPO3 6.2.15 for testing. Problems are still there in the workspace-mode. See new images...

Actions #3

Updated by Oliver Hader over 8 years ago

Can you provide a repository link to the source code of your extension? Otherwise it's getting difficult to guess your configuration and things you maybe are doing there. Thx.

Actions #4

Updated by Oliver Hader over 8 years ago

And please provide a short step-by-step guide on how to reproduce this behavior in a particular scenario (with your extension probably).

Actions #5

Updated by Oliver Hader over 8 years ago

The "Element ... does not exist" thingy seems to be related to #67676 (deleted child elements in a workspace).

Actions #6

Updated by Kurt Gusbeth over 8 years ago

Problem 1 is a general problem. It occurs always (not only in the workspace mode). When I select a file with this FlexForm

        <templateFile>
            <TCEforms>
                <label>Template file</label>
                <config>
                    <type>input</type>
                    <default></default>
                    <wizards type="array">
                        <_PADDING>2</_PADDING>
                        <link type="array">
                            <type>popup</type>
                            <title>Link</title>
                            <icon>link_popup.gif</icon>
                            <script>browse_links.php?mode=wizard&amp;act=file</script>
                            <params type="array">
                                <blindLinkOptions>page,url,mail,spec</blindLinkOptions>
                                <allowedExtensions>htm,html,tmpl,tpl</allowedExtensions>
                            </params>
                            <JSopenParams>height=300,width=500,status=0,menubar=0,scrollbars=1</JSopenParams>
                        </link>
                    </wizards>
                </config>
            </TCEforms>
        </templateFile>

then only "file:3453" will be stored in the FlexForm data.
templateFile should contain the path to the file - like in TYPO3 4.x - and not only "file:3453".
Is that a bug or do I need to chance the FlexForms?

Actions #7

Updated by Kurt Gusbeth over 8 years ago

Problem 2: when I am in the Draft workspace and select a uploaded file with this code:

$TCA['tx_myquizpoll_question'] = array (
    'ctrl' => $TCA['tx_myquizpoll_question']['ctrl'],
    'interface' => array (
        'showRecordFieldList' => 'sys_language_uid,l10n_parent,l10n_diffsource,hidden,fe_group,title,title_hide,name,...,image,alt_text'
    ),
    'columns' => array (
        't3ver_label' => array (        
            'label'  => 'LLL:EXT:lang/locallang_general.xml:LGL.versionLabel',
            'config' => array (
                'type' => 'input',
                'size' => '30',
                'max'  => '30',
            )
        ),
        'sys_language_uid' => array (        
            'exclude' => 1,
            'label'  => 'LLL:EXT:lang/locallang_general.xml:LGL.language',
            'config' => array (
                'type'                => 'select',
                'foreign_table'       => 'sys_language',
                'foreign_table_where' => 'ORDER BY sys_language.title',
                'items' => array(
                    array('LLL:EXT:lang/locallang_general.xml:LGL.allLanguages', -1),
                    array('LLL:EXT:lang/locallang_general.xml:LGL.default_value', 0)
                )
            )
        ),
        'l10n_parent' => array (        
            'displayCond' => 'FIELD:sys_language_uid:>:0',
            'exclude'     => 1,
            'label'       => 'LLL:EXT:lang/locallang_general.xml:LGL.l18n_parent',
            'config'      => array (
                'type'  => 'select',
                'items' => array (
                    array('', 0),
                ),
                'foreign_table'       => 'tx_myquizpoll_question',
                'foreign_table_where' => 'AND tx_myquizpoll_question.pid=###CURRENT_PID### AND tx_myquizpoll_question.sys_language_uid IN (-1,0)',
            )
        ),
        'l10n_diffsource' => array (        
            'config' => array (
                'type' => 'passthrough'
            )
        ),
        ...
        'image' => array (        
            'exclude' => 1,        
            'label' => 'LLL:EXT:myquizpoll/locallang_db.xml:tx_myquizpoll_question.image',        
            'config' => array (
                'type' => 'group',
                'internal_type' => 'file',
                'allowed' => 'gif,png,jpeg,jpg',    
                'max_size' => $GLOBALS['TYPO3_CONF_VARS']['BE']['maxFileSize'],    
                'uploadfolder' => 'uploads/tx_myquizpoll',
                'show_thumbs' => 1,    
                'size' => 1,    
                'minitems' => 0,
                'maxitems' => 1,
            )
        ),
        ...
    ),
    'types' => array (
        '0' => array('showitem' => 'sys_language_uid;;;;1-1-1, l10n_parent, l10n_diffsource, hidden;;1, title;;2;;2-2-2, name;;;richtext[paste|bold|italic|underline|formatblock|class|left|center|right|orderedlist|unorderedlist|outdent|indent|link|image]:rte_transform[mode=ts];3-3-3, image;;18, qtype;;3, answer1;;4, correct1;;5, answer2;;6, correct2;;7, answer3;;8, correct3;;9, answer4;;10, correct4;;11, answer5;;12, correct5;;13, answer6;;14, correct6;;15, points;;16, explanation;;17;richtext[paste|bold|italic|underline|formatblock|class|left|center|right|orderedlist|unorderedlist|outdent|indent|link|image]:rte_transform[mode=ts]')
    ),
    'palettes' => array (
        ...
    )
);

I often get this error message:
1: The destination (/var/www/html/server/uploads/tx_myquizpoll) or the source file (/var/www/html/server/uploads/tx_myquizpoll/5011) does not exist. (tx_myquizpoll_question:505:image)

When I save the same file again, it works.
5011 is a file-entry in sys_file. 5011 should be replaced by "fileadmin/" and the field identifier of the table sys_file.
You find the extension here:
[[http://typo3.org/extensions/repository/view/myquizpoll]]

Actions #8

Updated by Oliver Hader over 8 years ago

Kurt Gusbeth wrote:

Problem 1 is a general problem. It occurs always (not only in the workspace mode). When I select a file with this FlexForm
[...]
then only "file:3453" will be stored in the FlexForm data.
templateFile should contain the path to the file - like in TYPO3 4.x - and not only "file:3453".
Is that a bug or do I need to chance the FlexForms?

That's the effect of the file abstraction layer (FAL). Only references to a file entity are stored, not the full path anymore.
If you put "file:1234" to ResourceFactory::retrieveFileOrFolderObject() you get the accordant file entity.
Thus, that's not a bug, but something that needs to be changed in the processing logic of your extension.

Actions #9

Updated by Oliver Hader over 8 years ago

  • Subject changed from FAL does not work with workspaces correct to Legacy uploadfolder does not work correct in workspaces
Actions #10

Updated by Alexander Opitz almost 8 years ago

  • Status changed from Needs Feedback to New
  • Assignee set to Oliver Hader
Actions #11

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from New to Closed
  • Assignee deleted (Oliver Hader)

Sorry for the so late answer; I close this issue as it is not related to the core and moreover there has been no activity on it since more than 1 year.

If you think that this is the wrong decision, please reopen it or open a new issue with a reference to this one. Thank you.

Actions

Also available in: Atom PDF