Implement batch untagging function in a custom component. However, the simplest way is to look into the source code. The bug is on the code line 1056 in the file \\libraries\cms\helper\tags.php. The argument(s) of the SQL clause IN should be enclosed in braces.
Without SQL syntax error at batch untagging in a component.
The bug leads to the error message:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 3 SQL=DELETE FROM #__contentitem_tag_map WHERE `type_alias` = 'com_gfamily.domain' AND `content_item_id` = 2 AND
tag_id
IN 2
The line 1056 of the file \\libraries\cms\helper\tags.php is currently
$query->where($db->quoteName('tag_id') . ' IN ' . implode(',', $tags));
and should be
$query->where($db->quoteName('tag_id') . ' IN (' . implode(',', $tags) . ')');
The bug is present in the JoomlaCMS since version 3.4 (maybe sooner or since introducing tagging capabality) and persists in the version 3.5.1 as well.
Category | ⇒ | SQL Tags |
OK, past the weekend.
Bye, mrkale.
On Fri, Apr 15, 2016 at 11:35 AM, andrepereiradasilva <
notifications@github.com> wrote:
@mrkale https://github.com/mrkale can you do a Pull Request (PR) to
correct that?https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/helper/tags.php#L1056
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#9926 (comment)
I think this caqn be closed since there is a PR for that: #9946
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-04-16 16:55:30 |
Closed_By | ⇒ | brianteeman |
Labels |
Added:
?
|
@mrkale can you do a Pull Request (PR) to correct that?
https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/helper/tags.php#L1056