Mark Coates Posted July 9, 2019 Share Posted July 9, 2019 Hi all, I am in the middle of adding a new improved knowledgebase and some of the old articles which have been deleted and no longer in the database still have the tags showing. Is this a bug or something as the only way I can think of removing these at the minute is to go through the database and remove manually. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 9, 2019 Share Posted July 9, 2019 Hi Mark, 57 minutes ago, Mark Coates said: I am in the middle of adding a new improved knowledgebase and some of the old articles which have been deleted and no longer in the database still have the tags showing. showing where? in the tag cloud sidebar ? 59 minutes ago, Mark Coates said: Is this a bug or something... aah that age old question - is this a bug? how did you delete the kb articles? if you did it directly in the database, then I can see that might have left the tags remaining.... if you delete the article from the admin area, then it should have deleted the relevant tags too from the separate tags database table... as a test in v7.7.1, i've just deleted an article with tags, and it removed the tags from the tags db table at the same time. any chance that the tags used on those deleted articles could have been included in other articles that still exist ?? 1 hour ago, Mark Coates said: as the only way I can think of removing these at the minute is to go through the database and remove manually. if WHMCS hasn't removed them, then a visit to tblknowledgebasetags may be in order.... I suppose programmatically, you could rewrite the tag sidebar with a hook to only use tags from articles that exist, or run a SQL query on the tags table to see if the article exists, and if not delete it - but frankly, unless you have a lot of articles, manually going through the table might be easier. 0 Quote Link to comment Share on other sites More sharing options...
Mark Coates Posted July 9, 2019 Author Share Posted July 9, 2019 13 minutes ago, brian! said: showing where? in the tag cloud sidebar yes in the cloud sidebar 13 minutes ago, brian! said: how did you delete the kb articles? if you did it directly in the database, then I can see that might have left the tags remaining no these was deleted from the admin panel. the only difference was instead of some of them being BIG the changed to a smaller font as they was being deleted. 14 minutes ago, brian! said: any chance that the tags used on those deleted articles could have been included in other articles that still exist I have deleted the majority of what i had as i am making them animated now so even if they all have not gone the majority of them should have gone. 15 minutes ago, brian! said: if WHMCS hasn't removed them, then a visit to tblknowledgebasetags may be in order.... I suppose programmatically, you could rewrite the tag sidebar with a hook to only use tags from articles that exist, or run a SQL query on the tags table to see if the article exists, and if not delete it - but frankly, unless you have a lot of articles, manually going through the table might be easier. I tihnk that as im redoing them i think it should be safe to clear the tags from current articles then clear the DB table and then add the tags back into the current. I think this should work. 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 9, 2019 Share Posted July 9, 2019 Just now, Mark Coates said: no these was deleted from the admin panel. the only difference was instead of some of them being BIG the changed to a smaller font as they was being deleted. that would imply that the tags must exist in other articles, as the more times a tag is used, the larger the font. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Technical Analyst II WHMCS Lawrence Posted July 9, 2019 WHMCS Technical Analyst II Share Posted July 9, 2019 If you use a truncate SQL query on the applicable tables, it should be fine. If you continue to experience issues like this, please contact our support team so we can investigate them further. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.