Skip to content

[4.x] Fix settings component parameters of menuitems via API#44119

Merged
MacJoom merged 7 commits intojoomla:4.4-devfrom
SniperSister:4.4-fix-menuitem-post-bug
Sep 25, 2024
Merged

[4.x] Fix settings component parameters of menuitems via API#44119
MacJoom merged 7 commits intojoomla:4.4-devfrom
SniperSister:4.4-fix-menuitem-post-bug

Conversation

@SniperSister
Copy link
Contributor

Summary of Changes

This PR fixes the creation new menuitems if created via the webservices API. The bug fixed prevented API calls from setting component-specific parameters, as the component parameters were not joined in the form preprocessing.

Testing Instructions

  • Create a new menu item for the "feature articles" view of com_content via the webservices API. Set the num_columns parameter of the params array to 5.
  • Check the created item in the backend

Actual result BEFORE applying this Pull Request

  • "#Columns" field in the Blog Layout tab is empty

Expected result AFTER applying this Pull Request

  • "#Columns" field in the Blog Layout tab is set to 5

Example request payload

{
  "access": "1",
  "alias": "",
  "browserNav": "0",
  "component_id": "19",
  "home": "0",
  "language": "*",
  "link": "index.php?option=com_content&view=featured",
  "menutype": "mainmenu",
  "note": "",
  "params": {
    "cancel_redirect_menuitem": "",
    "catid": "",
    "custom_cancel_redirect": "0",
    "enable_category": "0",
    "menu-anchor_css": "",
    "menu-anchor_title": "",
    "menu-meta_description": "",
    "menu-meta_keywords": "",
    "menu_image": "",
    "menu_image_css": "",
    "menu_show": "1",
    "menu_text": "1",
    "page_heading": "",
    "page_title": "",
    "pageclass_sfx": "",
    "redirect_menuitem": "",
    "robots": "",
    "show_page_heading": "",
    "num_columns": 5
  },
  "parent_id": "1",
  "publish_down": "",
  "publish_up": "",
  "published": "1",
  "template_style_id": "0",
  "title": "MyPostTest",
  "toggle_modules_assigned": "1",
  "toggle_modules_published": "1",
  "type": "component"
}

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • [ x] No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • [ x] No documentation changes for manual.joomla.org needed

@alikon
Copy link
Contributor

alikon commented Sep 22, 2024

I have tested this item ✅ successfully on 84ac7f8


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

@richard67
Copy link
Member

I have tested this item ✅ successfully on 84ac7f8


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

@richard67 richard67 changed the title [4.x] Fix settings component parameters of menuitems via API [4.x] Fix settings component parameters of menuitems via API Sep 22, 2024
@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 22, 2024
@MacJoom MacJoom added this to the Joomla! 4.4.9 milestone Sep 22, 2024
@MacJoom MacJoom self-assigned this Sep 25, 2024
@MacJoom MacJoom merged commit 0461c99 into joomla:4.4-dev Sep 25, 2024
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 25, 2024
@MacJoom
Copy link
Contributor

MacJoom commented Sep 25, 2024

Thank you!

Hackwar added a commit that referenced this pull request Sep 29, 2024
Fix ActionLog duplicated query while language loading (#44077)
Fix settings component parameters of menuitems via API (#44119)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants