Project

General

Profile

Actions

Bug #93267

open

Aspects setting in routeEnhancers 'blocks' a preview page

Added by Mayer Patrick over 3 years ago. Updated 9 months ago.

Status:
Needs Feedback
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2021-01-11
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Aspects routeEnhancer hidden
Complexity:
Is Regression:
Sprint Focus:

Description

Let's imagine we have a list of postings on a blog or something similar.
The postings have their own page with a slug.
We use the routeEnhancer to create nice links.
The users can create new postings in the frontend and preview them (in FE) before publication (DB data field hidden = 1).

In the list of postings we have links something like this:

https://xyz.ch/postings?tx_extension_plugin[action]=list&tx_extension_plugin[controller]=Posting&tx_extension_plugin[posting]=160&cHash=1991dd7f9cb3b962f399148a8f8ec86b

Slug of posting 160 is: 'travel-to-new-zealand'

If the page is not hidden (=0), the routeEnhancer delivers the link 'travel-to-new-zealand' as defined in the slug.
If the page is hidden (=1), the routeEnhancer respectively the aspects delivers only the output: 160.

Of course, page 160 is not found and a 404 Not Found error results.

However, it shouldn't be aspects' responsibility whether it does its job or not if the page is hidden.
Aspects should also work for hidden pages (preview pages in FE).

Actions #1

Updated by Markus Klein over 3 years ago

Do I understand correctly that the backend user is still active (loggedin) when the record shall be previewed?

Actions #2

Updated by Mayer Patrick over 3 years ago

No, there are only FE users.

Actions #3

Updated by Markus Klein over 3 years ago

  • Status changed from New to Needs Feedback

Well, then this is expected I would say.

The basic thing is that the Core does not show hidden content.
So the database layer does not deliver a result when the slug is searched for.

By default I prefer the current behaviour that the Core delivers the 404 error for hidden records.
If you need custom handling for this I suppose you need some custom code for the Core to resolve also hidden records.

Changing this would be a breaking change and would probably now change all 404 errors to 500 errors because the routing would resolve the record and try calling the controller/action with the id, which would not execute unless the code has foreseen this case.

Actions #4

Updated by Mayer Patrick over 3 years ago

Many Thanks.

I already have a customer solution to show hidden data as a preview.
If, from the point of view of the 'Core', there is no way to process hidden data, then I ask you to close the issue.

Thank you for your commitment.

Actions #5

Updated by Markus Klein over 3 years ago

This could be a new feature for v11 of course.

Wanna share your solution to this here in a comment, so others can find it too?

Actions #6

Updated by Mayer Patrick over 3 years ago

Sure, as soon as I have a solution for it.

Actions #7

Updated by Oliver Hader over 1 year ago

  • Sprint Focus set to On Location Sprint
Actions #8

Updated by Benni Mack 9 months ago

  • Sprint Focus deleted (On Location Sprint)
Actions

Also available in: Atom PDF