Project

General

Profile

Actions

Bug #105537

closed

Strict Typing causes TypeError in SlugService of redirects module

Added by Jörn Wagner about 1 month ago. Updated 9 days ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling & Redirect Handling
Target version:
-
Start date:
2024-11-04
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In certain circumstances, an editor can be confronted with a 503 error in the backend after editing a page record.

The log then shows the following error message:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: strpos(): Argument #1 ($haystack) must be of type string, null given | 
TypeError thrown in file /var/www/public/typo3/sysext/redirects/Classes/Service/SlugService.php in line 282.

Preconditions for this bug to occur:

1. autoUpdateSlugs must be set to true (default)
2. Strict Typing must have been activated through a hook listening to processDatamap_afterDatabaseOperations for table pages
3. Page must have a sub-page with an empty slug¹
4. Parent page record is edited with a change in either the slug or the title that will result in an update to the slugs of the sub pages

¹ I don't even know how we got to this point as I've been unable to get any page to be saved with an empty slug, but I guess the data schema allows it so we have to provision against it

Actions #1

Updated by Georg Ringer about 1 month ago

  • Status changed from New to Needs Feedback

thanks for creating the issue! can you provide a bit more context as I don't find any function strpos in v12 SlugService nor v13. or check if valid in latest 12 versions?

Actions #2

Updated by Jörn Wagner 9 days ago · Edited

  • TYPO3 Version changed from 12 to 11

You're right, the public/typo3/sysext folders from v11 were still in that project directory on my local machine (although gitignored), so this only applies to v11. Since we've switched all projects to v12 now and don't use ELTS, you may close the ticket.

Actions #3

Updated by Garvin Hicking 9 days ago

  • Status changed from Needs Feedback to Closed

Closing as requested, thanks

Actions

Also available in: Atom PDF