Skip to content

[4.0][api][com_content] some fixes#27071

Closed
alikon wants to merge 11 commits intojoomla:4.0-devfrom
alikon:patch-112
Closed

[4.0][api][com_content] some fixes#27071
alikon wants to merge 11 commits intojoomla:4.0-devfrom
alikon:patch-112

Conversation

@alikon
Copy link
Copy Markdown
Contributor

@alikon alikon commented Nov 14, 2019

Summary of Changes

  1. added fulltext field to the articles model select list
  2. fix warning array_combine()
    3.fix PHP Notice When providing non existent article ID

Testing Instructions

  1. call the api api/index.php/v1/content/article
  2. call the api api/index.php/v1/content/article/XX

where xx is an article id without tags
and/or
where xx is not an article existent article id

Expected result

no notice
no warning

Actual result

PHP Notice: Undefined property: stdClass::$fulltext in .../api/components/com_content/View/Articles/JsonapiView.php on line 138

PHP Warning: array_combine(): Both parameters should have an equal number of elements in .../api/components/com_content/View/Articles/JsonapiView.php on line 171

@alikon alikon changed the title [4.0][api][com_content] add fulltext field for API [4.0][api][com_content] some fixes Nov 14, 2019
@Quy
Copy link
Copy Markdown
Contributor

Quy commented Nov 19, 2019

When providing nonexistent article ID:

PHP Notice: Undefined property: stdClass::$rawvalue in \api\components\com_content\View\Articles\JsonapiView.php on line 146

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Nov 20, 2019

Sorry more on multilingual site:

PHP Notice: Undefined property: stdClass::$associations in \api\components\com_content\View\Articles\JsonapiView.php on line 158

PHP Warning: Invalid argument supplied for foreach() in \api\components\com_content\View\Articles\JsonapiView.php on line 158

@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Nov 20, 2019

no problem at all
happy that you are testing...
just keep patience with my dirty hacks 😄

@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Nov 20, 2019

just give me more hints on how to replicate.... i'm on a multiligual now, but still don't get that notice with this pr applyed..... what i'm missing ?

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Nov 20, 2019

Install French and German.
Install Multilingual Sample Data.
Call the API.

27071

@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Nov 20, 2019

can you re-test please

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Nov 21, 2019

I have tested this item ✅ successfully on 5f1cd12


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

@alikon alikon added the GSoC label Jan 15, 2020
@alikon alikon closed this Feb 12, 2020
@alikon alikon reopened this Mar 18, 2020
@alikon
Copy link
Copy Markdown
Contributor Author

alikon commented Mar 18, 2020

as issues are still present
better to do another fresh one to solve conflict

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.

3 participants