Skip to content

[4.0][api][com_content] remove notice when Multilingual#28384

Merged
wilsonge merged 2 commits intojoomla:4.0-devfrom
alikon:patch-116
Mar 19, 2020
Merged

[4.0][api][com_content] remove notice when Multilingual#28384
wilsonge merged 2 commits intojoomla:4.0-devfrom
alikon:patch-116

Conversation

@alikon
Copy link
Copy Markdown
Contributor

@alikon alikon commented Mar 18, 2020

redo of #27071 .

Summary of Changes

  • added fulltext field to the articles model select list
  • fixed multilanguage

Testing Instructions

  1. install a multingual site
  2. run Multilingual Sample Data
  3. call the api api/index.php/v1/content/article

Expected result

no notice

Actual result

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

PHP Notice: Undefined property: stdClass::$associations in /var/www/html/jbs4/api/components/com_content/src/View/Articles/JsonapiView.php on line 164

cc @wilsonge

@Quy
Copy link
Copy Markdown
Contributor

Quy commented Mar 19, 2020

I have tested this item ✅ successfully on 5eca290


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

1 similar comment
@jwaisner
Copy link
Copy Markdown
Member

I have tested this item ✅ successfully on 5eca290


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

@jwaisner
Copy link
Copy Markdown
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Mar 19, 2020
@wilsonge
Copy link
Copy Markdown
Contributor

Just holding on merging this as need to reproduce. I think we may want to make multilang associations an empty array in this case rather than not render at all. BUT need to test to be sure :)

@SharkyKZ
Copy link
Copy Markdown
Contributor

And do we want fulltext always loaded in backend?

@wilsonge
Copy link
Copy Markdown
Contributor

We already started pulling out several properties to the api. fulltext isn't the end of the world. I don't like the associations fix but it's more related to how prepareItem works - think it needs to be aware of whether it's a list or item - but that's for a future PR. this will do for now

@wilsonge wilsonge merged commit 8d436f8 into joomla:4.0-dev Mar 19, 2020
@wilsonge
Copy link
Copy Markdown
Contributor

Thanks!

@joomla-cms-bot joomla-cms-bot added PR-4.0-dev and removed RTC This Pull Request is Ready To Commit labels Mar 19, 2020
@wilsonge wilsonge added this to the Joomla 4.0 milestone Mar 19, 2020
@alikon alikon deleted the patch-116 branch March 20, 2020 06:04
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.

6 participants