Project

General

Profile

Actions

Bug #86698

closed

FilesProcessor w/ custom FileReference for pages w/ plugin

Added by Benjamin Reinisch over 5 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
-- undefined --
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2018-10-19
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have set an additional page property (FileReference) in TCA. The defined FileProcessor:

page {
 10 {
    dataProcessing {
     50 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
       50 {
          references.fieldName = page_additional_image
          as = page_additional_image
        }
      }
    }
  }
} 

Until 8.7 all is working fine, in 9.5 the Query which is generated is wrong, if a CType list (plugin) is on the page.

SELECT `uid` FROM `sys_file_reference` 
WHERE (`uid_foreign` = 202) 
AND (`tablenames` = 'tt_content') 
AND (`fieldname` = 'page_additional_image') 
AND ((`sys_file_reference`.`deleted` = 0) 
AND ((`sys_file_reference`.`t3ver_state` <= 0) 
AND (`sys_file_reference`.`pid` <> -1)) 
AND (`sys_file_reference`.`hidden` = 0)) 
ORDER BY `sorting_foreign` ASC

The uid_foreign In the WHERE-clause is not the page uid anymore, it is the uid of the plugin from tt_content.

Information from debugging so far:
The variable $processedData["data"] in "typo3/sysext/frontend/Classes/DataProcessing/FilesProcessor.php” has already the wrong uid

Actions #1

Updated by Benjamin Reinisch over 5 years ago

  • Subject changed from FilesProcessor w/ custom FileReference for pages w/ Plugin to FilesProcessor w/ custom FileReference for pages w/ plugin
Actions #2

Updated by Joerg Kummer over 5 years ago

Its because the FileProcessor uses the current ContentObject, where this DataProcessor is requested from. Had some similar issues, and must drop using the FileProcessor from sysext frontend.

Actions #3

Updated by Benjamin Reinisch over 5 years ago

Some additional experience today. If the scenario is the same (some CType list - Plugin on the page), the access to all page attributes via data.PAGEPROPERTY does not work. I.e accessing the page uid via {data.uid} gives the uid from the tt_content Plugin element.

Actions #4

Updated by Markus Klein over 5 years ago

  • Category set to File Abstraction Layer (FAL)
Actions #5

Updated by Josef Glatz over 5 years ago

Could you please provide the whole TypoScript setup of your content element?

Actions #6

Updated by Markus Klein over 5 years ago

  • Status changed from New to Needs Feedback
Actions #7

Updated by Benjamin Reinisch over 5 years ago

It does not matter which CType list (plugin) is on the page w/ it's TS settings, even w/ georgringer/news and other ones this behavior is the same.

Actions #8

Updated by Christian Kuhn about 2 years ago

  • Status changed from Needs Feedback to New
Actions #9

Updated by Markus Klein about 2 years ago

  • Status changed from New to Needs Feedback

As requested above already: Please specify the full TS for page.10 as well as the TCA for the additional field.
A ticket shall contain all information to reproduce an issue. Thanks.

Actions #10

Updated by Riccardo De Contardi over 1 year ago

  • Status changed from Needs Feedback to Closed

No feedback since a lot of time => closing this issue.

If you think that this is the wrong decision or experience the issue again and have more information about how to reproduce your problem, please reopen it or open a new issue with a reference to this one.

As Markus wrote, please add as much information as possible that could help in reproducing your problem

Thank you and best regards

Actions

Also available in: Atom PDF