No Code Attached Yet
avatar Kurantje
Kurantje
24 Dec 2022

Steps to reproduce the issue

Create a component (com_xxx) using a table with a special character, e.g. da-events
Go to ...?option=com_xxx&view=event&layout=edit&id=1 to get the first element from the table

Expected result

Get in edit.php the data from the da-events table for id=1

Actual result

Exception informing about sql syntax error (without insight in the actual query causing the error)

System information (as much as possible)

Joomla! Version 4.2.6
PHP Version 8.0.13
Database Server mysql
Version 10.3.28-MariaDB-cll-lve
Collation latin1_swedish_ci
Conn Collation utf8mb4_general_ci

Additional comments

The problem is in libraries/src/Table/Table.php
On line 734 it states: ->from($this->_tbl);
This should be: ->from($this->_db->quoteName($this->_tbl));

avatar Kurantje Kurantje - open - 24 Dec 2022
avatar Kurantje Kurantje - change - 24 Dec 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Dec 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Dec 2022
avatar richard67
richard67 - comment - 24 Dec 2022

@Kurantje Good catch. Do you want to create a pull request with your proposed fix so you get the flowers at the end? Especially for a small change in one file it's easy to do it directly here on GitHub, see https://docs.joomla.org/Using_the_Github_UI_to_Make_Pull_Requests for a description. It's a bit outdated with the branch names. A bug fix like this currently would have been made for the 4.2-dev branch.

avatar Kurantje
Kurantje - comment - 24 Dec 2022

@richard67 thanks. I've created the pull request in the 4.2-dev branch. Does it then also get carried over to the 4.3-dev branch? OR should I also do a pull request for that one?

avatar richard67 richard67 - close - 24 Dec 2022
avatar richard67
richard67 - comment - 24 Dec 2022

@Kurantje It will be merged up into the 4.3-dev branch sooner or later after it has been merged into 4.2-dev. I close this issue here as we normally do that when having a PR for an issue. Thanks.

avatar richard67 richard67 - change - 24 Dec 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-12-24 16:11:44
Closed_By richard67

Add a Comment

Login with GitHub to post a comment