? ? ? Success

User tests: Successful: Unsuccessful:

avatar shubhamnba2009
shubhamnba2009
23 Aug 2016

Summary of Changes

In Joomla 1.0 it was possible to create a menu link to an article from the article edit view in the administrator back-end. Joomla is missing this feature since 1.5 and it has a long time since then. Content-Createmenulink plugin recreates the old memories of creating menu item directly from the component view.

Testing Instructions

  1. Install the patch/PR.
  2. Go to Extensions > Plugins.
  3. Enable Content-Createmenulink Plugin if it is disabled.
  4. Click on Content-Createmenulink plugin.
  5. Parameter dialogue view will appear.
    firstpr1
  6. Enter component+view in the form [com_content.article], just like in the given image below.
    Type two component view to enable component in both component view.
    [Note: Remember to press enter before typing second component+view name]

firstpr2

  1. Navigate to content > article >create new article.
  2. A new tab named as "Menu link options" will appear.
    firstpr3
  3. Fill all the details.
  4. Check fornt end.
  5. Also try to make a new menu item for contact or other 3rd party component using this PR.
    firstpr4

Expected outcome

New menu item for the article/contact/3rd party component will get created in the frontend.

avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2016
Category Language & Strings Administration Templates (admin) JavaScript Plugins Front End
avatar shubhamnba2009 shubhamnba2009 - open - 23 Aug 2016
avatar shubhamnba2009 shubhamnba2009 - change - 23 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Aug 2016
Labels Added: ? ?
avatar shubhamnba2009 shubhamnba2009 - change - 23 Aug 2016
Title
Menupluginpr
Improving menu item workflow in Joomla[GSoC 16_menu_for_article_project]
avatar shubhamnba2009 shubhamnba2009 - change - 23 Aug 2016
Title
Menupluginpr
Improving menu item workflow in Joomla[GSoC 16_menu_for_article_project]
avatar zero-24
zero-24 - comment - 23 Aug 2016

As we add a plugin we need The Update SQLs, add the new plugin to the install sql, the new plugin needs to be added to the script.php and the new lanugage files needs to be added to the install.xml

avatar zero-24
zero-24 - comment - 23 Aug 2016

We should move media/plg_content_createmenulink/copytitle.js to media/plg_content_createmenulink/js/copytitle.js and add a copytitle.min.js same for the other JS file.

avatar zero-24
zero-24 - comment - 23 Aug 2016
avatar zero-24
zero-24 - comment - 23 Aug 2016
avatar jeckodevelopment
jeckodevelopment - comment - 23 Aug 2016

see also minor change in shubhamnba2009#3

avatar andrepereiradasilva
andrepereiradasilva - comment - 24 Aug 2016

@shubhamnba2009 as @zero-24 said

As we add a plugin we need The Update SQLs, add the new plugin to the install sql, the new plugin needs to be added to the script.php and the new lanugage files needs to be added to the install.xml

You need to add the plugin to the installation sql (mysql: https://github.com/joomla/joomla-cms/blob/staging/installation/sql/mysql/joomla.sql#L616) and also to the update sql (mysql: https://github.com/joomla/joomla-cms/tree/staging/administrator/components/com_admin/sql/updates/mysql) in all 3 database systems.

Also you need to add them to updater so the manifest cache can be refreshed on update: https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/script.php#L348

avatar zero-24
zero-24 - comment - 25 Aug 2016

We need the mssql and postgressql for the install SQL too :)

avatar shubhamnba2009
shubhamnba2009 - comment - 25 Aug 2016

@andrepereiradasilva Have a look in the latest commit of changing queries with quoteName() and quote(), thanks :)

avatar infograf768
infograf768 - comment - 27 Aug 2016

As we use menu item and not menu link generally speaking in Joomla, I suggest to modify the ini string values to fit.
Also we do not use Menu Name but simply Menu (see mod_menu)

avatar shubhamnba2009
shubhamnba2009 - comment - 27 Aug 2016

@infograf768 That means I have to change the plugin name also?

avatar infograf768
infograf768 - comment - 27 Aug 2016

I would, but I am not the only one to decide. Let's wait what others think.

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Aug 2016

i agree with @infograf768 IIRC there is no "menu link" in joomla, it's always called "menu item".
for consistency all should changed to menu item IMHO.

avatar dgt41
dgt41 - comment - 31 Aug 2016

@shubhamnba2009 can you check my approach on the module ordering #11040? Maybe it worth a port here to menuorder field...
Just an idea

avatar brianteeman brianteeman - change - 6 Sep 2016
Category Language & Strings Administration Templates (admin) JavaScript Plugins Front End Administration Feature Request Front End JavaScript Language & Strings Plugins Templates (admin)
avatar brianteeman brianteeman - change - 6 Sep 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 6 Sep 2016
Labels
avatar shubhamnba2009
shubhamnba2009 - comment - 7 Sep 2016

Is dis ready for commit? Any more suggestions or changes that I need to implement?

avatar brianteeman
brianteeman - comment - 7 Sep 2016

I couldnt get it to install using patchtester so I downloaded your branch to try.

that shows the plugin as being enabled but there is nothing in the article to create a menu

avatar brianteeman
brianteeman - comment - 7 Sep 2016

I had to open and save the plugin - that suggests that you are not setting the plugin params in th installation

avatar shubhamnba2009
shubhamnba2009 - comment - 7 Sep 2016

@brianteeman
Yeah I also just checked out that after opening and saving the plugin starts to works. I have updated the installation folder before. Let me have a double check on what I left. Thanks for the heads up!!

avatar brianteeman
brianteeman - comment - 7 Sep 2016

Issue 1
1. Create an article called brian and save it with a menu item of brian
2. Create an article called john and save it with a menu item of brian
Expected result is that the article will NOT save and you will get an error that the menu exists already
Actual result is that the article is saved and you will get an error that the menu exists already

Issue 2
1. Create an article called simon and save and close
2. Re-open the article and save and close
Expected result is that the article is saved as normal
Actual result is that that the article is saved AND a menu item is created

Thats just the start. Every time I open an article I see something new. This needs a lot more work in testing what happens when you create articles AND edit existing articles ESPECIALLY if you do NOT want a menu item

avatar shubhamnba2009
shubhamnba2009 - comment - 7 Sep 2016

For issue 2.
I had considered that user had enabled plugin with the intention to create a menu item. So if he does not want to get a menu item created he had to clear the menu title, which in fact has another fucntionality of getting auto-filled based on the article title.
So basically every time user enter the article title same title will be automatically copied to menu title. Beacuse of this functionality menu item is getting created.
So what's you suggestion. Should I remove auto-fill functionality?

avatar brianteeman
brianteeman - comment - 7 Sep 2016

YES the auto-fill cannot be on for everything - no way you would ever want to create a menu item for everything

avatar brianteeman
brianteeman - comment - 7 Sep 2016

In Joomla 1.0 it was possible to create a menu link to an article from the article edit view in the administrator back-end.

It should work like that - you have the option/ability to create a menu link from the article edit view. It should not be created automatically for everything

avatar pe7er
pe7er - comment - 10 Sep 2016

I like the auto-refill function (automatically copying the (article) title for the menu item) because it speeds up your workflow as you've to type less. However I did not realize that as @brianteeman describes, because the menu title was already added by auto-fill, it would always create a menu item.

Maybe we can change the feature a bit? e.g. add a checkbox or button with "copy menu item title from title" and if it's clicked then copy the title of the item to the Menu Item Title input box.

avatar brianteeman
brianteeman - comment - 10 Sep 2016

It needs to be more than that. Right now the code will always create a menu
item if there is a title. There is no positive action "create menu". There
needs to be. Its more than just how the title is created that needs looking
at it is the whole process of how a menu item is created

On 10 September 2016 at 07:54, Peter Martin notifications@github.com
wrote:

I like the auto-refill function (automatically copying the (article) title
for the menu item) because it speeds up your workflow as you've to type
less. However I did not realize that as @brianteeman
https://github.com/brianteeman describes, because the menu title was
already added by auto-fill, it would always create a menu item.

Maybe we can change the feature a bit? e.g. add a checkbox or button with
"copy menu item title from title" and if it's clicked then copy the title
of the item to the Menu Item Title input box.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#11766 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8ch49GOmZ9aX-E8bwfrJb-posxKuks5qolQ0gaJpZM4JrUoO
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar shubhamnba2009
shubhamnba2009 - comment - 18 Oct 2016

@brianteeman I have done modifications as suggested by you. Could you please review once?

avatar puneet0191
puneet0191 - comment - 18 Oct 2016

@shubhamnba2009 Thanks ?

avatar jeckodevelopment
jeckodevelopment - comment - 6 Nov 2016

FYI: PLT voted on merging this and motion passed.

@shubhamnba2009 and @puneet0191 can you please solve conflicts with this PR?

Please test again since this will be merged in the core.

avatar joomla-cms-bot joomla-cms-bot - change - 6 Nov 2016
Category Language & Strings Administration Templates (admin) JavaScript Plugins Front End Feature Request SQL Administration Components Postgresql MS SQL Language & Strings JavaScript Front End Plugins Feature Request
avatar joomla-cms-bot joomla-cms-bot - change - 6 Nov 2016
Category Language & Strings Administration JavaScript Plugins Front End Feature Request SQL Components Postgresql MS SQL Administration Components SQL Postgresql MS SQL Language & Strings Installation JavaScript Front End Plugins Feature Request
avatar brianteeman
brianteeman - comment - 9 Nov 2016

When creating a menu item there is an option to select the parent item
I would expect this to show me a list of all the current menu items for the selected menu
Instead it shows me a list of all the menu items for all the menus and the admin menus in one single list

menulink

avatar infograf768
infograf768 - comment - 10 Nov 2016

Agree with Brian.
The confusion also comes from the fact that there are 2 dropdown fields
One general when editing the Content: Parent Item
Another one in the Menu Item Options.
Until the article is saved AFTER choosing the Menu in the Menu Item Optiins, we then get the correct possible Parent Items, and only then.

The Menu has to be chosen first and the possible parent menu items should be displayed on the fly.
In any case, we should never display back-end menu items imho.

Another issue is that after save and close, if we re-edit the article, there is no trace of the menu item that has been created. This is prone to errors when one has many article menu items.

avatar brianteeman
brianteeman - comment - 10 Nov 2016

Not just a confusion - it is 100% wrong to show those admin component menu items

avatar infograf768
infograf768 - comment - 11 Nov 2016

It is very easy to target only frontend menu items with a
->where($db->quoteName('a.client_id') . ' = 0')

But, for me, even after correcting this, the way it works is very confusing as parent menu items corresponding to a specific menu are not proposed on the fly and no trace remains of an article menu item already created for that article when editing the article.

avatar joomla-cms-bot joomla-cms-bot - change - 2 Dec 2016
Category Language & Strings Administration JavaScript Plugins Front End Feature Request SQL Components Postgresql MS SQL Installation Repository Administration com_admin SQL Postgresql MS SQL com_banners com_categories com_config com_contact com_content com_contenthistory com_fields Feature Request Components
avatar joomla-cms-bot joomla-cms-bot - change - 2 Dec 2016
Category Administration Feature Request SQL Components Postgresql MS SQL Repository com_admin com_banners com_categories com_config com_contact com_content com_contenthistory com_fields Administration com_admin SQL Postgresql MS SQL Language & Strings Front End com_content Installation JavaScript Plugins Feature Request Components
avatar shubhamnba2009 shubhamnba2009 - change - 2 Dec 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 2 Dec 2016
Category Administration Feature Request SQL Components Postgresql MS SQL com_admin com_content Language & Strings Front End Installation JavaScript Plugins Administration com_admin SQL Postgresql MS SQL Language & Strings Installation JavaScript Front End Plugins Feature Request Components
avatar puneet0191
puneet0191 - comment - 3 Feb 2017

@shubhamnba2009 Could you please resolve conflicts on this one?

avatar shubhamnba2009
shubhamnba2009 - comment - 5 Feb 2017

@puneet0191 I have noticed a new check (appveyor) is integrated now. The PR is failing its check... Any idea whom should I contact to know about it?

avatar roland-d
roland-d - comment - 19 Aug 2017

@shubhamnba2009 Appveyor should be fine. If you can resolve the conflicts we can see what the automated tests do and we can follow up as needed.


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

avatar joomla-cms-bot joomla-cms-bot - change - 19 Aug 2017
Category Administration Feature Request SQL Components Postgresql MS SQL com_admin Language & Strings Front End Installation JavaScript Plugins SQL Administration com_admin Postgresql MS SQL Language & Strings Templates (admin) Installation JavaScript Front End Plugins Feature Request Components
avatar shubhamnba2009
shubhamnba2009 - comment - 19 Aug 2017

@roland-d I resolved the conflicts.. Let me know how the automated test does :)

avatar roland-d
roland-d - comment - 19 Aug 2017

@shubhamnba2009 All tests passed. Thanks ?

avatar roland-d
roland-d - comment - 19 Aug 2017

Now we just need human test. I will get some people to test next week.

avatar brianteeman
brianteeman - comment - 19 Aug 2017

Tested this and it never populates the parent item

menu

avatar brianteeman
brianteeman - comment - 19 Aug 2017

Further test

  1. Menu title not stored in the article so no way to see if an article has a menu item
  2. Menu item created as unpublished so you still need to go to the menu to publish it which defeats part of the object of this PR

menu2

avatar wilsonge
wilsonge - comment - 2 Aug 2018

This has been superceeded by #21357 and merged so closing here - thanks for all the hard work that was done here!

avatar wilsonge wilsonge - close - 2 Aug 2018
avatar wilsonge wilsonge - change - 2 Aug 2018
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2018-08-02 11:39:54
Closed_By wilsonge

Add a Comment

Login with GitHub to post a comment