Project

General

Profile

Actions

Bug #104208

closed

Database upgrade wizard for "Migrate backend groups "explicit_allowdeny" field to simplified format" should display an error

Added by Florian Rival 4 days ago. Updated 1 day ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
Start date:
2024-06-25
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.2
Tags:
Complexity:
easy
Is Regression:
No
Sprint Focus:

Description

When you upgrade TYPO3 from V11 to V12 using the Upgrade Wizard ' Migrate backend groups "explicit_allowdeny" field to simplified format. ' and you have be_group field " explicit_allowdeny " with deny value like this:

explicit_allowdeny="tt_content:CType:header:DENY" 

The result of the wizard is "Update successful" on a green background like as if everything had gone correctly but with the text :
Access rights setup "Explicitly allow field values" of be_groups row uid "2" had explicit DENY set for the table/field/value combination "tt_content:CType:header". This is not allowed anymore. This be_groups row needs a manual update to fix access rights.

Then it's not easy to see that there was an error, the message should be "*Error*" and the background should be red.


Files

ksnip_20240625-171307.png (120 KB) ksnip_20240625-171307.png Florian Rival, 2024-06-25 15:13
Actions #1

Updated by Georg Ringer 4 days ago

hey. could you provide a database sample to easier reproduce it. that would be great!

Actions #2

Updated by Florian Rival 3 days ago

Hello,

You can use this query to update a be_groups with old data on your V12 database (set the correct uid):

UPDATE be_groups SET explicit_allowdeny='tt_content:CType:header:DENY,tt_content:CType:bullets:DENY,tt_content:CType:table:DENY,tt_content:CType:list:DENY' WHERE uid=xx;

and next:

mark undone the upgrade wizard " Migrate backend groups "explicit_allowdeny" field to simplified format " and perform it.

Actions #3

Updated by Gerrit Code Review 3 days ago

  • Status changed from New to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84933

Actions #4

Updated by Gerrit Code Review 3 days ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84933

Actions #5

Updated by Garvin Hicking 3 days ago

Hi Florian,

Thanks for this query, this made reproduction for me REALLY easy.

I created a patch for it. It's a bit nasty, but luckily this is the only core wizard who has this odd side effect to report additional messages that should be revealed as errors.

The symfony message stream tags the output with "error", which is seen on the console output, but not with the Wizard GUI integration sadly. The Wizard GUI sadly only knows TRUE or FALSE as a result of the upgrade.

Since this wizard actually does perform most of the migration (apart from those listed as an error) it's not a true failure, but more a soft failure - and you are right, this needs to be revealed better to the user.

My patch does it in a way that these messages are in fact returned as errors, AND the wizard fails (even though it executes). The second execution would mark it as completed. I think that would be a fair solution, because the "proper" solution to it would be to chang ethe wizard API to allow for "notices". That would be a breakiung change and can't be done in either v12 nor v13 at the current time.

What do you think?

Actions #6

Updated by Gerrit Code Review 1 day ago

Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/84955

Actions #7

Updated by Garvin Hicking 1 day ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #8

Updated by Florian Rival 1 day ago

Thanks Garvin for the patch!

Actions

Also available in: Atom PDF