Feature ? PR-5.0-dev PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar alexandreelise
alexandreelise
28 Oct 2023

The work was already done by Joomla Team and other contributors what I did is just to use the TagApiSerializerTrait in ContentSerializer. It should be added everywhere where the tags are supported but to make it simple I added it just to ContentSerializer. Hope it helps. Tested it locally on my setup with Postman and it works.

Pull Request for Issue # .
No issues for this pull request

Summary of Changes

Add the Tag Relationship for ContentSerializer

Testing Instructions

  1. Apply the patch
  2. Run this command curl -X GET -H "X-Joomla-Token: YOUR_JOOMLA_API_TOKEN" -H "Accept: application/vnd.api+json" --url "https://example.org/api/index.php/v1/content/articles"
  3. It should return a response in JSON:API format containing the tags relationship

Actual result BEFORE applying this Pull Request

The tag relationship does not appear when doing a GET request on /api/index.php/v1/content/articles

Expected result AFTER applying this Pull Request

The tag relationship appears successfully alongside the other relationships like category and created_by

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

avatar alexandreelise alexandreelise - open - 28 Oct 2023
avatar alexandreelise alexandreelise - change - 28 Oct 2023
Status New Pending
avatar alexandreelise alexandreelise - change - 28 Oct 2023
The description was changed
avatar alexandreelise alexandreelise - edited - 28 Oct 2023
avatar alexandreelise alexandreelise - change - 28 Oct 2023
The description was changed
avatar alexandreelise alexandreelise - edited - 28 Oct 2023
avatar alexandreelise alexandreelise - change - 28 Oct 2023
Labels Added: PR-5.0-dev
avatar alexandreelise
alexandreelise - comment - 30 Oct 2023

Thx for your feedback @richard67

avatar wilsonge
wilsonge - comment - 31 Oct 2023

@laoneo @MacJoom you probably want this backported into 4.4

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

Thanks for this Trait @wilsonge

avatar HLeithner
HLeithner - comment - 31 Oct 2023

if it's also an issue in 4.4 it have to be recreated against 4.4 branch and upmerged later. can you please do this @alexandreelise ?

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

if it's also an issue in 4.4 it have to be recreated against 4.4 branch and upmerged later. can you please do this @alexandreelise ?

Hi @HLeithner what do you mean by upmerged later? I don't have merge permission can you clarify please ?

avatar richard67
richard67 - comment - 31 Oct 2023

@alexandreelise Upmerge means later when your PR for 4.4-dev will be done and merged into 4.4-dev by a maintainer, maintainers or release leads later merge that change from 4.4-dev up into 5.0-dev (and 5.1-dev) so that fix will be available with both 4.4.1 and 5.0.1 (if ready in time). Nothing you should worry about, you only need to knw that you should redo this PR for the 4.4-dev branch.

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

@alexandreelise Upmerge means later when your PR for 4.4-dev will be done and merged into 4.4-dev by a maintainer, maintainers or release leads later merge that change from 4.4-dev up into 5.0-dev (and 5.1-dev) so that fix will be available with both 4.4.1 and 5.0.1 (if ready in time). Nothing you should worry about, you only need to knw that you should redo this PR for the 4.4-dev branch.

Thanks for clarifying @richard67

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

Hi. Should I update this branch as suggested by GitHub to be aligned with upstream? @richard67

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

if it's also an issue in 4.4 it have to be recreated against 4.4 branch and upmerged later. can you please do this @alexandreelise ?

@HLeithner PR done same as in 5.0-dev as suggested. #42257

avatar richard67
richard67 - comment - 31 Oct 2023

Hi. Should I update this branch as suggested by GitHub to be aligned with upstream? @richard67

@alexandreelise No, you can close this PR here as it is the same as the new PR for 4.4-dev so it doesn't need an extra one for 5.0-dev.

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

Ok thanks

avatar richard67 richard67 - close - 31 Oct 2023
avatar richard67 richard67 - change - 31 Oct 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-10-31 14:32:46
Closed_By richard67
Labels Added: Feature ?
avatar richard67
richard67 - comment - 31 Oct 2023

Closing in favour of #42257 .

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

Hi. Should I update this branch as suggested by GitHub to be aligned with upstream? @richard67

@alexandreelise No, you can close this PR here as it is the same as the new PR for 4.4-dev so it doesn't need an extra one for 5.0-dev.

One more thing. Should my future pull request favor oldest supported joomla cms branch so that other maintainers or release lead can upmerge them easier than to redo this mistake I did today? @richard67

avatar richard67
richard67 - comment - 31 Oct 2023

@alexandreelise Bug fixes for bugs which exist in 4.4-dev and 5.0-dev have to be made for the 4.4-dev branch. Bug fixes for bugs which only exist in 5.x have to be made for the 5.0-dev branch. New features have to be made for the 5.1-dev branch.

avatar alexandreelise
alexandreelise - comment - 31 Oct 2023

@alexandreelise Bug fixes for bugs which exist in 4.4-dev and 5.0-dev have to be made for the 4.4-dev branch. Bug fixes for bugs which only exist in 5.x have to be made for the 5.0-dev branch. New features have to be made for the 5.1-dev branch.

Thanks for clarifying. Now I understand the process. Have a delightful day @richard67

avatar HLeithner HLeithner - change - 1 Nov 2023
Status Closed New
Closed_Date 2023-10-31 14:32:46
Closed_By richard67
Labels Added: ?
Removed: ?
avatar HLeithner HLeithner - change - 1 Nov 2023
Status New Pending
avatar HLeithner HLeithner - reopen - 1 Nov 2023
avatar HLeithner
HLeithner - comment - 1 Nov 2023

reopen and rebase explained in #42257 (comment)

avatar HLeithner HLeithner - change - 1 Nov 2023
Title
[5] Add Tag Relationship in ContentSerializer.php
[5.1] Add Tag Relationship in ContentSerializer.php
avatar HLeithner HLeithner - edited - 1 Nov 2023
avatar joomla-cms-bot joomla-cms-bot - change - 1 Nov 2023
Category Libraries Front End Plugins
avatar HLeithner HLeithner - change - 1 Nov 2023
Labels Added: PR-5.1-dev
avatar HLeithner HLeithner - change - 1 Nov 2023
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 1 Nov 2023
Category Libraries Front End Plugins Front End Plugins
avatar LadySolveig LadySolveig - change - 2 Nov 2023
Labels Added: ?
Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2023
Category Front End Plugins
avatar LadySolveig LadySolveig - change - 2 Nov 2023
Labels Added: ?
Removed: ?
avatar LadySolveig
LadySolveig - comment - 2 Nov 2023

Many thanks for this very nice PR @alexandreelise !

avatar alexandreelise
alexandreelise - comment - 2 Nov 2023

I'm always happy to help @LadySolveig

avatar LadySolveig LadySolveig - change - 3 Nov 2023
Labels Added: ?
Removed: ?
avatar LadySolveig LadySolveig - change - 3 Nov 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-11-03 06:31:46
Closed_By LadySolveig
Labels Added: ?
Removed: ?
avatar LadySolveig LadySolveig - close - 3 Nov 2023
avatar LadySolveig LadySolveig - merge - 3 Nov 2023
avatar alexandreelise
alexandreelise - comment - 3 Nov 2023

hurray celebrate! super joomlers around the world! we love joomla!

avatar alexandreelise
alexandreelise - comment - 3 Nov 2023

Someone is ruining the party. We should celebrate! A random contributor contributes to our beloved project joomla. We love joomla. Bye...for now.

avatar laoneo
laoneo - comment - 3 Nov 2023

Do you mean me who ruins the party?

avatar alexandreelise
alexandreelise - comment - 3 Nov 2023

Just to clarify. Why did CI pass if this PR is wrong why was it merged @laoneo ?

avatar laoneo
laoneo - comment - 3 Nov 2023

I did not say that the pr is wrong. Only that particular line. And CI does not check the doc blocks. They were brought to this good state by many contributors in all these years.

Why was it merged? Here and there are pr's merged where some stuff was wrong and then we fix it afterwards. This is normally no problem and contributors are happy to help. If you can't, I will do it by myself, no problem.

avatar alexandreelise
alexandreelise - comment - 3 Nov 2023

Have a delightful day @laoneo. Thanks for your help.

avatar laoneo
laoneo - comment - 3 Nov 2023

You don't have to thank me, more @LadySolveig which fixed it while some other people where discussing it.

Add a Comment

Login with GitHub to post a comment