No Code Attached Yet
avatar Joao-hey
Joao-hey
3 Nov 2023

I think i found a issue with tagshelper

(Steps to reproduce the issue)

I have used tagshelper to bind a tag function to a custom component. When I try to use "createTagsFromField()" to create a new tag in my component, the creation of the tag fails and returns 0.

i give the function array as parameter ["1", "2", "new"]
and get [1, 2, 0]

-

(Expected result)

The new tag is recognised by the "new" at the beginning and is created in __tags and its ID is added to $newTags[] and returned.

(Actual result)

It does not recognise that it is a new tag, so no tag is created and the name in $newTags[] is overwritten with 0.

-

(System info)

PHP 8.2 and the latest version of joomla 4. Tested it locally and via FTP, both the same.

-

Additional comments

i Could fix the problem locally by changing '#new#' to 'new' in line 248 & 253 in the TagsHelper file.

i did a vardump of the tags and saw that the tag that should be created just had "new" at the start. So it could eiter be the code in "createTagsFromField()" or where "new" is appended

screen shot 2023-11-03 at 16 11 32screen shot 2023-11-03 at 16 11 38

avatar Joao-hey Joao-hey - open - 3 Nov 2023
avatar Joao-hey Joao-hey - change - 3 Nov 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 3 Nov 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Nov 2023
avatar Joao-hey Joao-hey - close - 6 Nov 2023
avatar Joao-hey
Joao-hey - comment - 6 Nov 2023

Tested it out on a other machine and found the issue

avatar Joao-hey Joao-hey - change - 6 Nov 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-11-06 12:34:35
Closed_By Joao-hey

Add a Comment

Login with GitHub to post a comment