? ? Pending

User tests: Successful: Unsuccessful:

avatar alikon
alikon
27 Jul 2020

Pull Request for Issue #30145 .

Summary of Changes

complete the list of com_content fields to render via API GET
fixed the Notice reported #30134 (review)

Testing Instructions

call the api

--for article list
{{base_url}}api/index.php/v1/content/article

--for article item
{{base_url}}api/index.php/v1/content/article/{id}

Actual result BEFORE applying this Pull Request

these fields are not rendered:

  • alias
  • note
  • publish_up
  • publish_down
  • urls
  • created
  • created_by
  • created_by_alias
  • modified
  • modified_by
  • hits
  • version
  • featured_up
  • featured_down

Expected result AFTER applying this Pull Request

fields are rendered

{
    "links": {
        "self": "http://localhost/4beta/api/index.php/v1/content/article/6"
    },
    "data": {
        "type": "articles",
        "id": "6",
        "attributes": {
            "typeAlias": "com_content.article",
            "id": 6,
            "asset_id": 91,
            "title": "Your Template",
            "alias": "your-template",
            "state": 1,
            "created": "2020-07-26 09:35:57",
            "created_by": 223,
            "created_by_alias": "",
            "modified": "2020-07-26 09:51:30",
            "modified_by": 223,
            "publish_up": "2020-07-26 09:35:57",
            "publish_down": "2020-07-31 11:43:29",
            "images": {
                "image_intro": "",
                "float_intro": "",
                "image_intro_alt": "",
                "image_intro_caption": "",
                "image_fulltext": "",
                "float_fulltext": "",
                "image_fulltext_alt": "",
                "image_fulltext_caption": ""
            },
            "urls": {
                "urla": "http://alikonweb.it/A",
                "urlatext": "alikonweb",
                "targeta": "0",
                "urlb": "http://alikonweb.it/b",
                "urlbtext": "alikonweb",
                "targetb": "0",
                "urlc": "http://alikonweb.it/c",
                "urlctext": "alikonweb",
                "targetc": "0"
            },
            "version": 5,
            "metakey": "",
            "metadesc": "",
            "access": 1,
            "hits": 0,
            "metadata": {
                "robots": "",
                "author": "",
                "rights": ""
            },
            "featured": 0,
            "language": "*",
            "note": "a Note",
            "tags": [],
            "featured_up": null,
            "featured_down": null,
            "text": "<p>Templates control the look and feel of your website.</p>\r\n<p>This blog is installed with the Protostar template.</p>\r\n<p>You can edit the options by selecting the Working on Your Site, Template Settings link in the top menu (visible when you login).</p>\r\n<p>For example you can change the site background color, highlights color, site title, site description and title font used.</p>\r\n<p>More options are available in the site administrator. You may also install a new template using the extension manager.</p> "
        },
        "relationships": {
            "category": {
                "data": {
                    "type": "categories",
                    "id": "8"
                }
            },
            "author": {
                "data": {
                    "type": "users",
                    "id": "223"
                }
            }
        }
    }
}

Documentation Changes Required

avatar alikon alikon - open - 27 Jul 2020
avatar alikon alikon - change - 27 Jul 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 27 Jul 2020
Category Administration com_content
avatar chetanmadaan
chetanmadaan - comment - 27 Jul 2020

Awesome, I have verified the new fields render.

Before:

    "data": {
        "type": "articles",
        "id": "6",
        "attributes": {
            "typeAlias": "com_content.article",
            "id": 6,
            "asset_id": 91,
            "title": "Your Template",
            "state": 0,
            "created": "2020-06-01 21:23:07",
            "images": {
                "image_intro": "",
                "float_intro": "",
                "image_intro_alt": "",
                "image_intro_caption": "",
                "image_fulltext": "",
                "float_fulltext": "",
                "image_fulltext_alt": "",
                "image_fulltext_caption": ""
            },
            "metakey": "Keyword One, Keyword two, Keyword #3",
            "metadesc": "This is my Meta Description",
            "metadata": {
                "robots": "index, nofollow",
                "author": "Author of Article",
                "rights": "Copyright 2020 All rights, Reserved!"
            },
            "language": "*",
            "tags": [],
            "text": "<p>Templates control the look and feel of your website.</p>\r\n<p>This blog is installed with the Protostar template.</p>\r\n<p>You can edit the options by selecting the Working on Your Site, Template Settings link in the top menu (visible when you login).</p>\r\n<p>For example you can change the site background color, highlights color, site title, site description and title font used.</p>\r\n<p>More options are available in the site administrator. You may also install a new template using the extension manager.</p> "
        },
        "relationships": {
            "category": {
                "data": {
                    "type": "categories",
                    "id": "8"
                }
            },
            "author": {
                "data": {
                    "type": "users",
                    "id": "30"
                }
            }
        }
    }

After:

   "data": {
        "type": "articles",
        "id": "6",
        "attributes": {
            "typeAlias": "com_content.article",
            "id": 6,
            "asset_id": 91,
            "title": "Title of Article goes here",
            "alias": "your-template",
            "state": 1,
            "created": "2020-07-18 10:47:32",
            "created_by": 815,
            "created_by_alias": "",
            "modified": "2020-07-18 11:14:33",
            "modified_by": 815,
            "publish_up": "2020-07-18 10:47:32",
            "publish_down": null,
            "images": {
                "image_intro": "",
                "float_intro": "",
                "image_intro_alt": "",
                "image_intro_caption": "",
                "image_fulltext": "",
                "float_fulltext": "",
                "image_fulltext_alt": "",
                "image_fulltext_caption": ""
            },
            "urls": {
                "urla": "",
                "urlatext": "",
                "targeta": "",
                "urlb": "",
                "urlbtext": "",
                "targetb": "",
                "urlc": "",
                "urlctext": "",
                "targetc": ""
            },
            "version": 5,
            "metakey": "This is this",
            "metadesc": "This",
            "access": 1,
            "hits": 0,
            "metadata": {
                "robots": "noindex, follow",
                "author": "Author",
                "rights": "No Rights possible"
            },
            "featured": 1,
            "language": "*",
            "note": "",
            "tags": [],
            "featured_up": null,
            "featured_down": null,
            "text": "My text "
        },
        "relationships": {
            "category": {
                "data": {
                    "type": "categories",
                    "id": "8"
                }
            },
            "author": {
                "data": {
                    "type": "users",
                    "id": "815"
                }
            }
        }
    }

The warnings from Joomla backend is gone too.

avatar chetanmadaan chetanmadaan - test_item - 27 Jul 2020 - Tested successfully
avatar chetanmadaan
chetanmadaan - comment - 27 Jul 2020

I have tested this item successfully on 797a173


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

avatar Quy Quy - test_item - 27 Jul 2020 - Tested successfully
avatar Quy
Quy - comment - 27 Jul 2020

I have tested this item successfully on 797a173


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

avatar Quy Quy - change - 27 Jul 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 27 Jul 2020

RTC


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

avatar Quy Quy - close - 27 Jul 2020
avatar Quy Quy - merge - 27 Jul 2020
avatar Quy Quy - change - 27 Jul 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-07-27 21:40:47
Closed_By Quy
Labels Added: ? ?

Add a Comment

Login with GitHub to post a comment