? ? ? Pending

User tests: Successful: Unsuccessful:

avatar Didldu-Florian
Didldu-Florian
19 Oct 2019

Pull Request for Issue from facebook
https://www.facebook.com/groups/joomla.deutschland/permalink/1346440042196465/

Summary of Changes

Save a content directy to a new menu item.

PR requires #26675

Update: Removes also the old useless "add menu item" button.

Testing Instructions

  1. Apply Patch #26675 (required)
  2. Apply these Partch
  3. Create a new article
  4. Click on "Save to menu"
    savetomenu
  5. Article should been saved and redirects you to com_menu
  6. Menu SingleArticle should been preselected with the article you've created and the title from the article

Expected result

MenuNew

Actual result

New Feature

Documentation Changes Required

Yes, maybe

PR for the user survey from facebook + 50 users voted
SaveContent2Menu

Additional Infos

It's a global Save2Menu Function, could be finaly implement in any component

avatar Didldu-Florian Didldu-Florian - open - 19 Oct 2019
avatar Didldu-Florian Didldu-Florian - change - 19 Oct 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Oct 2019
Category Administration com_content Language & Strings
avatar Didldu-Florian Didldu-Florian - change - 19 Oct 2019
The description was changed
avatar Didldu-Florian Didldu-Florian - edited - 19 Oct 2019
avatar Fallatas Fallatas - test_item - 19 Oct 2019 - Tested successfully
avatar Fallatas
Fallatas - comment - 19 Oct 2019

I have tested this item successfully on 7a5d0c0


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

avatar Didldu-Florian
Didldu-Florian - comment - 19 Oct 2019

It's a global Save2Menu Function, could be finaly implement in any component

avatar Didldu-Florian Didldu-Florian - change - 19 Oct 2019
The description was changed
avatar Didldu-Florian Didldu-Florian - edited - 19 Oct 2019
avatar Didldu-Florian Didldu-Florian - change - 19 Oct 2019
Labels Added: ? ?
avatar 1apweb 1apweb - test_item - 19 Oct 2019 - Tested unsuccessfully
avatar 1apweb
1apweb - comment - 19 Oct 2019

I have tested this item ? unsuccessfully on 7a5d0c0

When I apply the patch there is this message :
Warning: require(D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php): failed to open stream: No such file or directory in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66

Fatal error: require(): Failed opening required 'D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php' (include_path='D:\xampp2\php\PEAR') in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66


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

avatar 1apweb
1apweb - comment - 19 Oct 2019

I have tested this item ? unsuccessfully on 7a5d0c0

When I apply the patch there is this message :
Warning: require(D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php): failed to open stream: No such file or directory in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66

Fatal error: require(): Failed opening required 'D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php' (include_path='D:\xampp2\php\PEAR') in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66


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

avatar 1apweb
1apweb - comment - 19 Oct 2019

When I apply the patch there is this message

Warning: require(D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php): failed to open stream: No such file or directory in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66

Fatal error: require(): Failed opening required 'D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php' (include_path='D:\xampp2\php\PEAR') in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66


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

avatar Quy Quy - change - 19 Oct 2019
Title
[2.0] Feature: Article > Save To Menu
[4.0] Feature: Article > Save To Menu
avatar Quy Quy - edited - 19 Oct 2019
avatar Didldu-Florian
Didldu-Florian - comment - 19 Oct 2019

When I apply the patch there is this message

Warning: require(D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php): failed to open stream: No such file or directory in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66

Fatal error: require(): Failed opening required 'D:\xampp2\htdocs\pizza\libraries\vendor\composer/../hoa/consistency/Prelude.php' (include_path='D:\xampp2\php\PEAR') in D:\xampp2\htdocs\pizza\libraries\vendor\composer\autoload_real.php on line 66
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26681.

Your Error has nothing to do with the patch

avatar joomla-cms-bot joomla-cms-bot - change - 19 Oct 2019
Category Administration com_content Language & Strings Administration com_content Language & Strings Libraries
avatar joomlamarco joomlamarco - test_item - 19 Oct 2019 - Tested successfully
avatar joomlamarco
joomlamarco - comment - 19 Oct 2019

I have tested this item successfully on acf4bf1

good feature


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

avatar crommie crommie - test_item - 19 Oct 2019 - Tested successfully
avatar crommie
crommie - comment - 19 Oct 2019

I have tested this item successfully on 82859f4

Yes! Nice.


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

avatar brianteeman
brianteeman - comment - 19 Oct 2019

This feature is already present
image

avatar HenkZ HenkZ - test_item - 19 Oct 2019 - Tested unsuccessfully
avatar HenkZ
HenkZ - comment - 19 Oct 2019

I have tested this item ? unsuccessfully on acf4bf1

The following error message appaers by installaing the requested pr #26675 ( ! ) Warning: require(C:\wamp\www\joomla\libraries\vendor\composer/../hoa/consistency/Prelude.php): failed to open stream: No such file or directory in C:\wamp\www\joomla\libraries\vendor\composer\autoload_real.php on line 66

I've installad Joomla_4.0.0-beta1-dev-Development-Full_Package nightly build and
https://github.com/joomla-extensions/patchtester/releases/tag/4.0.0-beta2

So the same error as mentioned before.
Note: The autoload_real.php on line 66 seems an issue because other "pizza bug & fun attendees" have the save issue in Nijmegen (with other issues).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26681.
avatar Didldu-Florian
Didldu-Florian - comment - 19 Oct 2019

@brianteeman only in edit an exisiting and not with passing data

avatar brianteeman
brianteeman - comment - 19 Oct 2019

Maybe but this is not the solution as we now have two completely different "save to menu" type buttons with completely different styling and different code

avatar sanderpotjer
sanderpotjer - comment - 19 Oct 2019

@Didldu-Florian I was guessing that as answer indeed. However, it might be a bit confusing now, as the behaviour is now different for the same action (creating menu item) depending on if your article is saved (modal) or not yet (redirect). Can't we make the behaviour similar to both cases?

I would also make more sense to add it to the "Save & Close" dropdown, so "Save & Create menu" or something?

avatar Didldu-Florian
Didldu-Florian - comment - 19 Oct 2019

Yes, let me merge these in these PR, because the current feature is not helpful. It opens just the menu creatin in a modal and did not pass any data. Maybe we can use the button including my function. Will try to merge it.

avatar Didldu-Florian
Didldu-Florian - comment - 19 Oct 2019

@brianteeman did also removed the old add menu button

avatar Didldu-Florian Didldu-Florian - change - 19 Oct 2019
The description was changed
avatar Didldu-Florian Didldu-Florian - edited - 19 Oct 2019
avatar 1apweb 1apweb - test_item - 19 Oct 2019 - Tested successfully
avatar 1apweb
1apweb - comment - 19 Oct 2019

I have tested this item successfully on 88cfd50

It's fine


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

avatar uglyeoin
uglyeoin - comment - 19 Oct 2019

So we are waiting for new code to test again?

avatar anibalsanchez anibalsanchez - test_item - 20 Oct 2019 - Tested successfully
avatar anibalsanchez
anibalsanchez - comment - 20 Oct 2019

I have tested this item successfully on 88cfd50

Test OK


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

avatar Didldu-Florian
Didldu-Florian - comment - 21 Oct 2019

@uglyeoin we can go finaly RTC
It's done for the core and com_content.

I will be working on implementing it to the other components, but not in these PR
So, can anybody please mark it as RTC? Thanks.

avatar SharkyKZ
SharkyKZ - comment - 21 Oct 2019

Sorry for late response. But this is not ready yet. Please remove this code, it was used by menu modal button

// Add necessary code for a new menu item modal
// Setup variables for display
$linkSuffix = '&layout=modal&client_id=0&tmpl=component&' . Session::getFormToken() . '=1';
$linkItem = 'index.php?option=com_menus&view=item' . $linkSuffix;
// Force the language of the menu item when multilang is implemented
if (Multilanguage::isEnabled() && $this->form->getValue('language') !== '*')
{
$linkItem .= '&forcedLanguage=' . $this->form->getValue('language');
}
$modalId = 'jform_request_id';
// Add the modal field script to the document head.
HTMLHelper::_('script', 'system/fields/modal-fields.min.js', array('version' => 'auto', 'relative' => true));
// Load the language files
$language = Factory::getLanguage();
$language->load('com_menus', JPATH_ADMINISTRATOR, null, false, true);
echo '<input type="hidden" class="form-control" id="' . $modalId . '_name" value="">';
echo '<input type="hidden" id="' . $modalId . '_id" value="0">';

avatar brianteeman
brianteeman - comment - 21 Oct 2019

An observation - with the way workflows is setup now by default when you create an article it is in the unpublished state. So when you create a new article and save to menu the menu will 404 because the article it is linking to is not published yet

avatar Didldu-Florian
Didldu-Florian - comment - 27 Oct 2019

Can we go RTC ?

avatar SharkyKZ
SharkyKZ - comment - 27 Oct 2019

This needs tests again after last code changes.

avatar brianteeman
brianteeman - comment - 28 Oct 2019

One thing I just noticed is that because the default behaviour of a new article is for it to be unpublished on save if you "save to menu" then it will appear to not work on the frontend because the article is not published

avatar uglyeoin
uglyeoin - comment - 28 Oct 2019

@Didldu-Florian I'll test when I have time, if you don't hear in a few days feel free to prompt me.

avatar vaibhavsTekdi vaibhavsTekdi - test_item - 2 Nov 2019 - Tested successfully
avatar vaibhavsTekdi
vaibhavsTekdi - comment - 2 Nov 2019

I have tested this item successfully on 08dfd51

#jpbf19 #test1


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

avatar atpatil11 atpatil11 - test_item - 2 Nov 2019 - Tested successfully
avatar atpatil11
atpatil11 - comment - 2 Nov 2019

I have tested this item successfully on 08dfd51

I have tested this Patch. It works!

This is simple & sweet feature.

#pbf19 #test2


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

avatar alikon alikon - change - 2 Nov 2019
Status Pending Ready to Commit
avatar alikon
alikon - comment - 2 Nov 2019

RTC


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

avatar wilsonge wilsonge - change - 2 Nov 2019
Labels Added: ?
avatar wilsonge wilsonge - change - 2 Nov 2019
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-11-02 23:49:07
Closed_By wilsonge
avatar wilsonge wilsonge - close - 2 Nov 2019
avatar wilsonge wilsonge - merge - 2 Nov 2019
avatar wilsonge
wilsonge - comment - 2 Nov 2019

Thanks!

Add a Comment

Login with GitHub to post a comment