[4.0] Fixing lots of issues in Tags component and grouping toolbar buttons#23402
[4.0] Fixing lots of issues in Tags component and grouping toolbar buttons#23402wilsonge merged 4 commits intojoomla:4.0-devfrom
Conversation
Front end? Tag field? |
|
Tags component in the backend. Edit a tag and try to select a parent tag.Am 31.12.2018 01:19 schrieb dGrammatiko <notifications@github.com>:
Right now the dropdown does not work
Front end? Tag field?
—You are receiving this because you authored the thread.Reply to this email directly, view it on GitHub, or mute the thread.
|
|
Looks good for me. But do not see the error in the tag field either. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23402. |
|
Ok, explaining the issue with the tags field again in detail:
|
I am guessing it's from: #22263
@Fedik can you please check those issues? |
I just checked and it works fine for me in Chrome and Firefox, without errors in console. @Hackwar which exactly error did you got?
If it works then all fine 😉
because it does not need
The mobile styling issue I better leave to someone who better know the template styles 😉
hm? I thought it accessible enough, that why we pick that script |
|
@Fedik |
Errrm, NOOOOO THIS IS WRONG and needs to be fixed!
False, this breaks on disconnect/reconnect, eg moving the element. Try to resize the page to get tabs to convert to accordion, then this is broken!
Well, it's not |
|
@Hackwar sorry I cannot reproduce the error (I tried with a tags and an article).
but it is working 😏
It does not fail because lack of mutation observer, it fail because the tab CE move a content of sections around (I do not ask why 😄), and so disconnectedCallback clean up the Choices instance. |
This is a copy of the trace of the problem. Even after pulling the latest changes and doing a clean npm i, I still get this error. |
|
All of these discussions about JS issues should however not prevent this PR from being merged. |
|
@Hackwar by looking the trace, it seems that value not a string. where One thing I guessing, maybe you have different database version, and I have MySQL 5.7.24. It not related to current pull request. |
|
|
|
Thanks for checking. As I expected the type is not a string ( |
|
I have tested this item ✅ successfully on e66e9fd For a test ist is necessary to add tags and therefore the patch #23395 mus be applied before testing. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23402. |
|
I have tested this item ✅ successfully on e66e9fd This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23402. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23402. |
|
Thanks! |

This PR removes a lot of code in com_tags which is obsolete and refactors existing code to adhere to existing standards.
In TagsModel we have the checking() and getTable() method, which are not in use and where I would assume, that they have never been in use.
In the Tag View, I've cleaned up the code a bit to adhere to our existing codebase.
In the Tags View, I've noticed that we are constructing a level filter dropdown which then is never used in the output. We have this already covered with the filter form XML. I also did the grouping of the toolbar buttons that @bembelimen and @chmst have started.
Last but not least, I've changed the TagField, since that failed in my installation. I had an empty tag table and created one tag and after that it thought to give the parent_id to the field as value and do so as an integer, which the field handled by throwing errors that the value is not a string and not an array and that implode() fails miserably here and that again results in an SQL query error. Creating an array here solves that for now, but I can already tell that it wont be enough to make this work again.
Testing instructions
Simply play around with the component before and after applying the patch and notice that nothing really has changed, except for the crippling error when editing an existing tag, whcih should have gone away.
Issues that came up
Right now the dropdown does not work. I don't know what the issue is, but I'm unable to select a parent for a new tag. It always sticks to "none" and also throws a JS error on the console. @dgrammatiko Maybe you can have a look here?
Also, the ajax call to search for the new parent tag is dispatched to the frontend com_tags component. Somehow I feel very uneasy about this, that everybody can query the tags in the frontend unauthenticated and thus can create a complete list of all tags of the site by simply not handing over any filter params. From my perspective, this should be code in the backend and definitely authenticated and somehow restricted.
More to follow soon.