Skip to content

[4.3] Fix check create article menu item with specific category#40637

Merged
obuisard merged 2 commits intojoomla:4.3-devfrom
heelc29:4.3/patch/create-article-menu-item
Jun 2, 2023
Merged

[4.3] Fix check create article menu item with specific category#40637
obuisard merged 2 commits intojoomla:4.3-devfrom
heelc29:4.3/patch/create-article-menu-item

Conversation

@heelc29
Copy link
Contributor

@heelc29 heelc29 commented May 21, 2023

Pull Request for Issue #17708 .

Summary of Changes

as we have a onContentBeforeSave in J4 to deal with workflows. Nothing should have changed - it should be cosmetic - but just to document the change in case.

checkMenuItemBeforeSave is called when context is com_menus.item

public function onContentBeforeSave($context, $table, $isNew, $data)
{
if ($context === 'com_menus.item') {
return $this->checkMenuItemBeforeSave($context, $table, $isNew, $data);
}

checkMenuItemBeforeSave always return true when context is com_menus.item

private function checkMenuItemBeforeSave($context, $table, $isNew, $data)
{
// Check we are handling the frontend edit form.
if ($context === 'com_menus.item') {
return true;
}

Testing Instructions

  • add a new menu item Create Article
  • enable Specific Category under Options
  • do not select a category

Actual result BEFORE applying this Pull Request

menu item is saved
image

Expected result AFTER applying this Pull Request

menu item is not saved and an error message is displayed
image

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.3-dev labels May 21, 2023
@richard67 richard67 added the bug label May 21, 2023
@ChristineWk
Copy link

I have tested this item ✅ successfully on 0df72f0


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

1 similar comment
@viocassel
Copy link
Contributor

I have tested this item ✅ successfully on 0df72f0


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

@richard67
Copy link
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label May 23, 2023
@obuisard obuisard added this to the Joomla! 4.3.3 milestone Jun 2, 2023
@obuisard obuisard merged commit 7fbf922 into joomla:4.3-dev Jun 2, 2023
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jun 2, 2023
@obuisard
Copy link
Contributor

obuisard commented Jun 2, 2023

Thank you @heelc29 for this PR!

@heelc29 heelc29 deleted the 4.3/patch/create-article-menu-item branch June 3, 2023 04:19
Kostelano added a commit to JPathRu/localisation that referenced this pull request Aug 20, 2023
Новое в Joomla 4.3.3 Stable
* joomla/joomla-cms#40637 +
* joomla/joomla-cms#40698 - (исправлено ранее)
* joomla/joomla-cms#40716 - (только для en-GB)
* joomla/joomla-cms#40732 +
* joomla/joomla-cms#40607 +

Новое в Joomla 4.3.4 Stable
* joomla/joomla-cms#40449 +
* joomla/joomla-cms#40119 +
* joomla/joomla-cms#40297 +
* "Вход на сайт", но "Выход из системы" - разброс формулировок исправлен на термин "система", подразумевая именно вход/авторизацию пользователя, а не просто серфинг страницы сайта без авторизации
* Другие мелкие исправления
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants