? Failure

User tests: Successful: Unsuccessful:

avatar chrisdavenport
chrisdavenport
19 Dec 2016

Pull Request for Issue #8074 and a replacement for PR #9155.

Summary of Changes

Finally got some time to look at this again. Although it's relatively straightforward to limit the number of tags initially shown in the drop-down (which was a problem for sites with thousands of tags), the list needs to be updated as tags are selected.

The problem is that if you select one or more tags from the list, then deselect them again (without clicking Save), the drop-down list is dramatically shortened to just those tags that have been added or removed since the page was loaded. The only way to load and select further tags is to start entering characters so that the search function kicks in.

With this PR, whenever a tag is selected an Ajax call is made so that tags are continually added to the drop-down list to replenish it.

In the process of writing this code I also made the JHelperTags::searchTags method a little smarter so that a considerable amount of duplicated code has been removed from JFormFieldTag::getOptions.

Testing Instructions

  • In Components -> Tags -> Options, set Maximum Items to something reasonably small, say 5.
  • Make sure you have more than that number of tags already created.
  • Edit an article, or some other content item with a tags field.
  • In the drop-down, notice that there are exactly 5 un-selected tags listed.
  • Select a tag from the list. In the drop-down, notice that an extra tag has been added to the list to maintain exactly 5 un-selected tags.
  • Deselect a tag. Notice that the drop-down now has 6 un-selected tags (we only add to the list, never remove from it).
  • Also check that it works as expected with UTF-8 tags.
  • Make sure I haven't broken anything else in the tags implementation.

Documentation Changes Required

None.

avatar chrisdavenport chrisdavenport - open - 19 Dec 2016
avatar chrisdavenport chrisdavenport - change - 19 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Dec 2016
Category com_tags Front End Layout Libraries
avatar chrisdavenport chrisdavenport - change - 19 Dec 2016
Labels Added: ?
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Jan 2017

I have tested this item ? unsuccessfully on 5adfe42

Set maximum Items on 5, having 6 Tags. In "Article > Tags" Dropdown is empty.


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

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 5 Jan 2017 - Tested unsuccessfully
avatar chrisdavenport
chrisdavenport - comment - 5 Jan 2017

@franz-wohlkoenig Thanks for testing. Was the dropdown empty before you applied the PR?

Can you look in developer tools and see if the Ajax is throwing any errors? What version of Joomla did you test with? What database are you using? Any errors logged?

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Jan 2017

Was the dropdown empty before you applied the PR?

  • Dropdown was not empty, all 6 Tags are shown

Can you look in developer tools and see if the Ajax is throwing any errors?

  • Where to look: "Console > JS", "Network"?

What version of Joomla did you test with?

  • 3.7.0-alpha2, Joomla! Nightly Builds

What database are you using?

  • MySQLi 5.5.53-0+deb7u1, PHP 7.0.4

Any errors logged?

  • Please write which Source you want to know
avatar webmiep webmiep - test_item - 31 Mar 2017 - Tested unsuccessfully
avatar webmiep
webmiep - comment - 31 Mar 2017

I have tested this item ? unsuccessfully on 5adfe42

Hello,
I have tested this.
Before appliing the PR I had 9 tags and in the dropdown all were shown.
After appliing I could not enter the article list becuase of this error:
Fatal error: Class 'JFormAbstractlist' not found in /home/eabbcbdv/public_html/nl/joomla8/libraries/cms/form/field/tag.php on line 20
I am sorry


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

avatar webmiep
webmiep - comment - 31 Mar 2017

Hello,
It looks like my comment was not published.
Before adding the PR There were 9 tags in the component. By editting an article in the tags dropdown were all 9 in this list.
After adding the PR article manager could not be opened becaus of this error:
Fatal error: Class 'JFormAbstractlist' not found in /home/eabbcbdv/public_html/nl/mydomain/libraries/cms/form/field/tag.php on line 20

I am sorry


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

avatar brianteeman
brianteeman - comment - 4 Jan 2018

I am closing this as it has not been successfully tested and there has been no comment from the OP

It can always be re-opened if fixed

avatar brianteeman brianteeman - change - 4 Jan 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-01-04 18:38:26
Closed_By brianteeman
avatar brianteeman brianteeman - close - 4 Jan 2018

Add a Comment

Login with GitHub to post a comment