Project

General

Profile

Actions

Story #82189

closed

Epic #90129: [Extbase] Issues regarding hidden or deleted records

Extbase modules switch off hidden fields as is backend

Added by Henri Nathanson over 6 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2017-08-24
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Sprint Focus:

Description

Working with Extbase and a module in a 7.6 backend I have processes, which explicitely work on hidden records. The records are hidden for the frontend, but are still valid records for internal processes of the backend. In order to get to related - hidden - models I tried the hack described by Oliver Hader in the below stackoverflow link. Did not work for me, though. I got into 500er errors and then just went on with old style queries to retrieve the uids of related hidden models.

I am really wondering. Is there no basic switch to shut off enabled fields for the backend completely? A switch to get the behaviour "backend" style. The "hidden" feature is all "frontend" style. Right? Any suggestions on how to implement such a switch? Besides perhaps overloading the QueryFactoryInterface?

config.modules_no_hidden_fields = 1

https://stackoverflow.com/questions/39993664/typo3-extbase-how-to-get-disabled-related-object-without-raw-sql-query
https://forum.typo3.org/index.php/t/153062/hidden-records-seem-to-be-unworkable-with-extbase-is-extbase-bloated-

Actions #1

Updated by Alexander Schnitzler over 4 years ago

  • Parent task set to #90129
Actions #2

Updated by Stefan P about 2 years ago

The correct way is to add a repository and override the createQuery method, in which you set something along the lines of

$querySettings->setIgnoreEnableFields(true);
$querySettings->setEnableFieldsToBeIgnored(['disable']);

Then any of your respository methods will implicitly ignore the enable fields. Even the ugly auto-magic (unimplemented) findByRandomProperty methods.

In my projects I usually have multiple createQuery* methods like createQueryRespectingEnableFields and createQueryIgnoringEnableFields and call them explicitly.

I'm not sure wether this ticket here is a valid request. Extbase gives you all the API methods you need, you just have to call or implement them. Or I misunderstood the request.

Actions #3

Updated by Henri Nathanson about 2 years ago

Oh. This ticket is old. I can't recall the problem. Thanks for commenting. Maybe the problem was specific on "related" models. Please close this. Thanks.

Actions #4

Updated by Riccardo De Contardi almost 2 years ago

  • Status changed from New to Closed

@Henri Nathanson Thank you for your feedback and sorry for the late reply;

I close this issue in agreement with the reporter.

If you think that this is the wrong decision or I have misunderstood or there is still work to be done, please reopen it or open a new issue with a reference to this one.

Thank you.

Actions

Also available in: Atom PDF