Skip to content

Conversation

@SharkyKZ
Copy link
Contributor

@SharkyKZ SharkyKZ commented Jul 8, 2019

Pull Request for Issue #23582 .

Summary of Changes

Adds access filter when counting items.

Testing Instructions

Create two articles.
Assign them the same tag.
Set access of one article to Registered.
Publish Tags - Popular module.
In the module enable Display Number of Items option.
View the module in frontend. Inspect the number of items next to the tag:
a) As guest.
b) As logged in user.

Expected result

a) 1
b) 2

Actual result

a) 2
b) 2

Documentation Changes Required

No.

@ghost
Copy link

ghost commented Jul 8, 2019

@kofaysi please test (how to: https://docs.joomla.org/Testing_Joomla!_patches)

@infograf768
Copy link
Member

@SharkyKZ
Shall not we do a similar patch for mod_tags_similar?

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 8, 2019

@infograf768, no, mod_tags_similar doesn't have this issue.

@kofaysi
Copy link
Contributor

kofaysi commented Jul 8, 2019

I have tested this item 🔴 unsuccessfully on cc7bcd8

The Tags - Popular module counts correctly the number of the articles the user can see in their user-level.

But, the Tags - Popular module items are linked to list all items of articles, weblinks and contacts together after clicking in the tag. And the count number misses the number of weblinks and contacts.

I'm sorry, I'm hesitating to write tested successfully.


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

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 8, 2019

That is expected behavior.

@kofaysi
Copy link
Contributor

kofaysi commented Jul 8, 2019

Do you mean that the module itself is stricken by a "multiple personality disorder"? If that is acceptable then the PR works as expected.

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 8, 2019

Tags component supports multiple content types. Tag view displays all content types by default, although filtering by type capability does exist. It's not implemented in the module though.

@SharkyKZ
Copy link
Contributor Author

SharkyKZ commented Jul 8, 2019

And the count number misses the number of weblinks and contacts.

Can you double check this? I can't reproduce the issue.

@kofaysi
Copy link
Contributor

kofaysi commented Jul 8, 2019

And the count number misses the number of weblinks and contacts.

Can you double check this? I can't reproduce the issue.

Negative. The number next to the tags includes the number of contacts and weblinks, but sometimes it differs: the list (after clicking on a tag) includes sometimes more items than the count displayed next to the tag. I think that the list includes items of the nested tags (sub-tags). The count include only items of that particular (parent) tag.

Note: it was a coincidence before in count of the articles (with nested tags, too) and total count related to that (parent) tag.

@kofaysi
Copy link
Contributor

kofaysi commented Jul 9, 2019

I think it is correct that the counts in the module are related to the parent tags only and they ignore the children tags. On the other hand, it is a very good idea to let the user know that there is more content available and show them the content somehow. It is unfortunate that the list of a content to a tag and its children tags is melted into a mixed list (titles are sorted alphabetically, aren't they?). I think that the generated list shouldn't be mixed.

  • It should list content to the requested (parent) tag and then list the content to the children (optional) with new sub-title for each: "children tag sub-tag" follows.
  • Or, the list can be strictly that of the parent tag and the list of its children tag should be offered for the user.
    I'm aware that the discussion is diverging away from the original topic and optionally another PR is needed somewhere else.

@ghost
Copy link

ghost commented Jul 9, 2019

I'm aware that the discussion is diverging away from the original topic and optionally another PR is needed somewhere else.

@kofaysi I suggest to open a new Issue to discuss the topic (also reference to this Issue).

@kofaysi
Copy link
Contributor

kofaysi commented Jul 10, 2019

I have tested this item ✅ successfully on cc7bcd8

Works as expected. Counts items (Contacts, Content, Weblinks) to a tag. Ignores items to the children tags of the counted tag.


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

@ghost
Copy link

ghost commented Jul 20, 2019

I have tested this item ✅ successfully on cc7bcd8


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

@ghost
Copy link

ghost commented Jul 20, 2019

Status "Ready To Commit".

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 20, 2019
@HLeithner HLeithner merged commit 0c4a4a3 into joomla:staging Jul 20, 2019
@HLeithner
Copy link
Member

thx

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 20, 2019
@HLeithner HLeithner added this to the Joomla! 3.9.11 milestone Jul 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants