SQL Exception InvalidFieldNameException [BUG] #93
Labels
No Label
bug
duplicate
enhancement
FR accepted
help wanted
invalid
need discussion
next release
not reproduced
PR requested
question
reproduced
WIP
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: deblan/side_menu#93
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Issue
Environment
Steps to reproduce
add to SQL_MODE="ANSI_QUOTES"
Open Custom Menu Settings results in:
Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'lang' in 'where clause'
Issue is caused by https://gitnet.fr/deblan/side_menu/src/branch/master/lib/Service/LangRepository.php
Line: 29
->where('configkey="lang" and appid="core" and configvalue<>"en"')
The issue could be fixed by switching the quotes to:
->where("configkey='lang' and appid='core' and configvalue<>'en'")
Unfortunately in my setup the database is managed externally and a change of the sql mode (which could also fix the issue) is not possible. It would be nice if the code could be adapted accordingly, as the use of single quotes for string literals is more in line with best practice.
Fixed in v2.3.3!