? Pending
Pull Request for # 5631

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
5 Mar 2016

Pull Request for Issue #5631.

Summary of Changes

When you create a new tag from com_tags component then save-events are triggered, but from com_content article edit layout after add a new tag events are missing.

I created a proposal for missing content event for
onContentBeforeSave and onContentAfterSave.

I put a raw context "com_tags.tag" but it may be changed to ex: typeAlias.

Method JHelperTags::createTagsFromField currently is not a static method so should be run as
instance method in addTagMapping at line 65:

$tags = self::createTagsFromField($tags);

Testing Instructions

It requires some content plugin with methods onContentBeforeSave and onContentAfterSave for context "com_tags.tag".

I want to use that for filter tag alias and title.

avatar csthomas csthomas - open - 5 Mar 2016
avatar csthomas csthomas - change - 5 Mar 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 5 Mar 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 7 Mar 2016
Category Tags
avatar brianteeman brianteeman - change - 7 Mar 2016
Rel_Number 0 5631
Relation Type Pull Request for
avatar brianteeman
brianteeman - comment - 7 Mar 2016

Testers please review comments on #5631


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9307.

avatar csthomas csthomas - change - 8 May 2016
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2016-05-08 17:29:14
Closed_By csthomas
avatar csthomas csthomas - close - 8 May 2016
avatar csthomas csthomas - close - 8 May 2016
avatar csthomas csthomas - change - 8 May 2016
Status Closed New
Closed_Date 2016-05-08 17:29:14
Closed_By csthomas
avatar csthomas csthomas - change - 8 May 2016
Status New Pending
avatar csthomas csthomas - reopen - 8 May 2016
avatar csthomas csthomas - reopen - 8 May 2016
avatar csthomas
csthomas - comment - 9 May 2016

I created a mistake closing that request. I still think that this patch can help.

May be that commit is not beautiful, but complete tags events.

Events should be run when:

  • a tag is creating or modifying at com_tags edit form (currently it is working)
  • and when a tag is creating at com_content edit form (currently missing)
  • probably on other components because tags is everywhere, but I concentrate only on article tags.

When some developer want to create some tag validation for articles then there is a problem.

What should I do when I want to filter tags and do not allow to creating tags with match regular pattern?

  • my answer is to use this patch

Please give me some advice.
What should I change for patch to be considered useful enough to be accepted?

avatar joomla-cms-bot joomla-cms-bot - change - 7 Sep 2016
Category Tags Libraries
avatar marrouchi
marrouchi - comment - 24 Jan 2017

@csthomas I think this PR is the simplest solution to use right now. I would suggest in a future intervention the following :

  1. Move the createTagsFromField into a core system plugin that gets executed on onContentAfterSave. The plugin in question would simply search if there's any tag attribute in the saved object and then create the new tags found.
  2. Use the TagsModelTag::save instead of TagsTableTag::store to automatically trigger the onContentAfterSave with a "com_tags.com_tags.tag" context.

Do you want me to test this PR ?

avatar csthomas
csthomas - comment - 24 Jan 2017

This PR wait a long time for any interest.
If you can please test.
You need some plugin which will catch that events. If there will be a success test then PR will be more interesting for others.

If more people would like more changes then I can try to find better solution.

avatar marrouchi
marrouchi - comment - 24 Jan 2017

I have tested this item successfully on 9bda7fe


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/9307.

avatar marrouchi marrouchi - test_item - 24 Jan 2017 - Tested successfully
avatar brianteeman
brianteeman - comment - 21 May 2017

@csthomas this is very hard to test without a plugin that catches these events - if you can provide one it will be easier to get people to test it

avatar csthomas csthomas - change - 1 Feb 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-02-01 12:43:02
Closed_By csthomas
avatar csthomas csthomas - close - 1 Feb 2018

Add a Comment

Login with GitHub to post a comment