Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Tags: Adding associations #39140

Open
wants to merge 23 commits into
base: 5.3-dev
Choose a base branch
from
Open

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Nov 2, 2022

Pull Request for Issue #6687 .

Summary of Changes

Tags in Joomla have so far partial support for multilanguage capabilities and there was partial, non-working code for associations. This PR introduces associations completely, cleans up the code around this and the multilanguage features are brought up to par with the rest of the Joomla core components.

  • When multilanguage is enabled, the views in the component now only show tags and content items for the current language and *.
  • The tag_list_language_filter option was removed, since it conflicts with how multilinguality works in all of the rest of Joomla. Now it automatically behaves like the rest when multilanguage is enabled.
  • The TagModel::save() method has been largely removed and replaced with the call to AdminModel::save(). The only thing that was kept was the rebuild of the nested set structure. The old code didn't have the code for associations included and I'm pretty sure some other stuff was missing here, too.
  • Tag associations aren't just one-on-one mappings, but there are cases where you have selected more than one tag per menu item. In that case, we have to find the association for each tag individually and then create a URL out of all those associated IDs combined. If in case of multiple tag IDs a tag doesn't have an associated tag, it will use the original tag to build the new URL. This assumes that such a tag will have * as language value.
  • The branch is based on the changes from [4.3] Rewriting com_tags router #39114. Please keep that PR open as well and test them separately! These changes are pretty large and if we push this all into one giant PR, this will never get tested and merged. That would be very unfortunate, so please keep it the way it is. This PR already is gigantic.
  • The component currently does not contain the Associations toolbar button.

Testing Instructions

Please first test the general functionality of tags. This means to create a few tags in the backend both via the component and by the input field in for example articles. Assign those tags to content items, create menu items in the frontend for these tags or the the "all tags" menu item type. Surf those pages in the frontend and check if everything is displayed correctly. Also create menu items with more than one tag selected for it.

In the next step, enable multilanguage mode and mark several content items with different content languages. Mark at least one tag as from one content language, create a second tag with another content language and associate these 2 tags. Check in the frontend that a tag view only shows content matching the current language and if you click on a flag, it should redirect to the associated tag.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

I don't know what we have to change here...

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.3-dev labels Nov 2, 2022
@Hackwar Hackwar marked this pull request as ready for review November 3, 2022 09:18
@jamfx
Copy link

jamfx commented Nov 3, 2022

I have tested this item 🔴 unsuccessfully on 0d7ed82

Ok, i tried the following and didn't succeed. The Test failed at least partly.
Steps I took.

  1. Joomla Default Installation with Multilanguage Sample Data
  2. Installed German and Greek languagepacks
  3. Opened Tags and Translated Millions to Millionen for Association.
  4. now set Millions to English and Millionen to German
  5. Opened "Millions"-Tag and clicked on Associations. Now I wanted to choose Millionen and typed in "Mill" but only the item IDs showed up. I could save the IDs successfully, but after reopening nothing was shown in Associations.

I stopped the test here.
Thanks for your work so far!


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

@Hackwar
Copy link
Member Author

Hackwar commented Nov 9, 2022

@jamfx I did some fixes. Please test this again.

@Hackwar Hackwar changed the base branch from 4.3-dev to 4.4-dev March 23, 2023 10:33
@Hackwar Hackwar changed the title [4.3] Tags: Adding associations [4.4] Tags: Adding associations Mar 23, 2023
@Quy Quy removed the PR-4.3-dev label Mar 23, 2023
@laoneo
Copy link
Member

laoneo commented Mar 28, 2023

Thank you for your contribution, unfortunately the 4.4-dev branch doesn't get new features. When #40181 is merged this pr should be rebased to 5.0-dev. Thanks for understanding.

@Hackwar Hackwar changed the title [4.4] Tags: Adding associations [5.0] Tags: Adding associations Mar 28, 2023
@Hackwar Hackwar changed the base branch from 4.4-dev to 5.0-dev March 28, 2023 08:00
@Hackwar Hackwar changed the base branch from 5.1-dev to 5.2-dev April 3, 2024 15:25
@Hackwar Hackwar marked this pull request as ready for review July 26, 2024 16:24
// phpcs:enable PSR1.Files.SideEffects

/**
* Content associations helper.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this say

Suggested change
* Content associations helper.
* Tags associations helper.

If so then other comments should be updated as well

@fgsw
Copy link

fgsw commented Aug 1, 2024

After local installation of Full Package.zip tried installation of german and persian farsi, but Unable to detect manifest file.

@brianteeman
Copy link
Contributor

After local installation of Full Package.zip tried installation of german and persian farsi, but Unable to detect manifest file.

thats a known issue when using a development package as there are no language packs available for that version. For testing you can download a language pack for 5,.1 directly and then use the extension installer https://downloads.joomla.org/language-packs

@fgsw
Copy link

fgsw commented Aug 2, 2024

I have tested this item 🔴 unsuccessfully on 418dfb1

  • no Multilingual Sample Data used
  • added Tags, no associations shown:
    1
  • open a tag show prefilled association:
    2
  • save tag without changes, now associations shown:
    3
  • open another tag show same prefilled association:
    4
  • save tag without changes show different associations:
    5

Note 1: There is no difference if the tag is saved

  • without changes
  • deleted the association per x
  • using another tag as association.

Note 2: Tags associations tab looks different to article associations tab (Select, Create buttons):
2a


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

@HLeithner HLeithner changed the base branch from 5.2-dev to 5.3-dev September 2, 2024 08:53
@HLeithner
Copy link
Member

This pull request has been automatically rebased to 5.3-dev.

@HLeithner HLeithner changed the title [5.2] Tags: Adding associations [5.3] Tags: Adding associations Sep 2, 2024
@Hackwar Hackwar removed the PR-5.2-dev label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants