Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
28 Mar 2024

Pull Request for Issue #37305 .

Summary of Changes

When creating a new JSONApiView object, but not handing over the optional parameter 'contentType', the following line with the JoomlaSerializer throws an error.

Testing Instructions

Codereview

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 Hackwar Hackwar - open - 28 Mar 2024
avatar Hackwar Hackwar - change - 28 Mar 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2024
Category Libraries
avatar Quy Quy - test_item - 29 Mar 2024 - Tested successfully
avatar Quy
Quy - comment - 29 Mar 2024

I have tested this item ✅ successfully on 9c3c54e


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

avatar wilsonge
wilsonge - comment - 29 Mar 2024

The intention here was type is a required parameter. Either via injecting through content type or setting it directly in the class depending on the use case. We might be better off throwing a legit 500 to symbolize that though, the serializer is required for both displayList and displayItem - so don't think this is the fix.

avatar HLeithner
HLeithner - comment - 31 Jul 2024

In this case we should do it the same as all other object we need.
So we need a SerializerAwareInterface requres a setSerializer function and SerializerAwareTrait this implements with a private variable and a getter function.
Similar to CurrentUserInterface

Add a Comment

Login with GitHub to post a comment