Joomla Field Tags error frontend #604
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: joomla/Component-Builder#604
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Joomla Tag field type is added to the getListQuery model but there is no db column added to the db table.
this of course gives a Unknown column 'a.tags' in 'field list'
i see 2 options
problem with option 1 is u can never use a field and name it tag, therefor i would go for option2 and add a table column (which remains empty)
The dynamic get area gives you the ability to get the table, instead of the view values. Using the table does not return the tags column. yet if you use the view option, just remove the tags column, or use the select all option if it is the main table.
The values are stored in the #__contentitem_tag_map table, and should you need the actual tag values, you should use the join options to get those tags, something like this:
So to me the option to add the tags to the tag table is really not good, it will complicate the model, since we actually do need the tags field to store it correctly into the #__contentitem_tag_map table. Best just remove the field from the table query when you setup the dynamicGet in the first place (manually).
I am closing this, but if you still think more consideration is required just bump this issue, and I will reopen it if needed.
this is not about getting the tags values, this about using a field of type "tag" giving an error cause the column is not created by jcb. Just adding that column in that table is all that has to be done to get rid of that error. We don't need to set any values to it, it just have to exist since the model assumes it's there, which is giving the error.
The front-end model will only look for this if you leave the tags value in the query, if you remove it like so:
TO:
OR:
You should not have any issue.
The main reason the GUI adds the tags field/column is because of how it builds the fields in the first place, it does not know head of time if a field is added to the database, or not. But hey, the code that builds the SQL query values in the GUI are over here, and you are most welcome to go over that and make a pull request if you feel you have found a better implementation.
But I am not going to force the tags field to be added to the table, as this will be a bad implementation and cause all sorts of pain.
Yes I overlooked the dynamic get, thanks