Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL error when soft delete from fe_users table was removed #228

Open
soee opened this issue Nov 14, 2024 · 2 comments
Open

SQL error when soft delete from fe_users table was removed #228

soee opened this issue Nov 14, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@soee
Copy link

soee commented Nov 14, 2024

There may be projects where removing soft delete functionality from fe_users is a requirement. When we remove soft delete and the related deleted column from the database, Luxletter encounters an issue when attempting to fetch the number of users in frontend groups. This typically occurs when rendering a preview of the newsletter.

Instead of displaying the actual error to users, Luxletter shows a generic validation error message. However, the underlying error is logged in the system log:

Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1054: An exception occurred while executing a query: Unknown column 'deleted' in 'where clause' | Doctrine\DBAL\Exception\InvalidFieldNameException thrown in file /var/www/html/vendor/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php in line 67. Requested URL: https://foo.ddev.site/typo3/ajax/luxletter/wizardUserPreview?token=--AnonymizedToken--&usergroups=2

The issue originates in the UserRepository.php file, line 99, where the deleted column is used directly within a raw SQL query.

@einpraegsam einpraegsam added the enhancement New feature or request label Nov 19, 2024
@einpraegsam
Copy link
Collaborator

Thx for notifying us.
I never heard of the possibility to change fe_users like that, but I can image what's the desire behind this change.

At the moment, we don't plan to change the behaviour. Nevertheless, I will keep this issue open. Maybe others are also interested in this feature.

@soee
Copy link
Author

soee commented Dec 11, 2024

There is also a second place, where the same happens: https://github.com/in2code-de/luxletter/blob/develop/Classes/Domain/Repository/QueueRepository.php#L35

So here we have this line:

$query->equals('user.deleted', false),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants