Skip to content

[4.2] Menu item custom field#38244

Merged
roland-d merged 7 commits intojoomla:4.2-devfrom
brianteeman:menuitem
Jul 13, 2022
Merged

[4.2] Menu item custom field#38244
roland-d merged 7 commits intojoomla:4.2-devfrom
brianteeman:menuitem

Conversation

@brianteeman
Copy link
Copy Markdown
Contributor

Summary of Changes

adds a custom field to show a list of all menu items that can be selected and then displayed as a link in the frontend

Testing Instructions

Install a prebuilt package
or
Install this PR, discover the extension and publish the plugin

Create a menuitem custom field. Check that it shows all menuitems from all menus in the select ;ist and then check on the front end that the link is displayed.

Expected result AFTER applying this Pull Request

image

image

image

Documentation Changes Required

New plugin

@joomla-cms-bot joomla-cms-bot added Language Change This is for Translators PR-4.2-dev labels Jul 7, 2022
@woluweb
Copy link
Copy Markdown
Contributor

woluweb commented Jul 8, 2022

I have tested this item ✅ successfully on b304e06

Hi,

Txs very much Brian for introducing this new Type of Custom Fields!

Note for those who don't know: this follows a question I raised yesterday on the Joomla Facebook Group: https://www.facebook.com/groups/joomlanospam/posts/10158401801610997/

I have tested this successfully (on an existing J4.1 website).
You can see the result on https://subform.joomlacustomfields.org/ (link "Matrioshka" at the bottom of Article 1).

This new Type of Custom Fields can be useful in many cases.
But let me share here my own usecase as it could give ideas to others: suppose you have a Blog View... but when clicking on one of the post you don't want to open the corresponding article... but another Blog View. With other words, you want "nested Blog Views" (ie a kind of "Matryoshka").

Txs again Brian for this (very) quick PR :)


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

@viocassel
Copy link
Copy Markdown
Contributor

I have tested this item ✅ successfully on b304e06


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

@richard67
Copy link
Copy Markdown
Member

RTC


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Jul 8, 2022
@roland-d roland-d merged commit 32ef564 into joomla:4.2-dev Jul 13, 2022
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Jul 13, 2022
@roland-d
Copy link
Copy Markdown
Contributor

Thank you.

@roland-d roland-d added this to the Joomla! 4.2.0 milestone Jul 13, 2022
@brianteeman brianteeman deleted the menuitem branch July 13, 2022 18:16
Kostelano added a commit to JPathRu/localisation that referenced this pull request Jul 19, 2022
joomla/joomla-cms#36749 +
joomla/joomla-cms#38228 +
joomla/joomla-cms#38227 - (только для en-GB, у нас исправлено ранее)
joomla/joomla-cms#38255 +
joomla/joomla-cms#38244 +
joomla/joomla-cms#38271 - (только для en-GB, у нас исправлено ранее)
joomla/joomla-cms#38287 - (только для en-GB, у нас исправлено ранее)
joomla/joomla-cms#38301 - (только для en-GB, у нас исправлено ранее)
@HLeithner
Copy link
Copy Markdown
Member

@chmst found out that this field breaks if you set a default value
image

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 8, 2022

So I checked and the Default value has no use in this field. However there is no toggle we can set to not show it for a specific field. Due to being there and when filled, it is added as XML element to the list of options to render and this crashes because it is not used and as such does not match anything and the default is throw this error message.

Since the default makes no sense here, I will create a PR where the field itself can decide if the Default value should be shown.

@roland-d
Copy link
Copy Markdown
Contributor

roland-d commented Aug 8, 2022

PR created: #38423

roland-d added a commit that referenced this pull request Aug 14, 2022
This reverts commit 32ef564

Signed-off-by: Roland Dalmulder <contact@rolandd.com>
@roland-d roland-d removed this from the Joomla! 4.2.0 milestone Aug 14, 2022
@roland-d
Copy link
Copy Markdown
Contributor

This PR has unfortunately been reverted as there are more issues to be resolved. Related PRs with fixes are:

It is best to roll this PR and the other PRs into 1 new PR for 4.3, so we have more time to test and verify the solutions.

@brianteeman
Copy link
Copy Markdown
Contributor Author

only because we both misread each others comments

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Aug 14, 2022

Best thing would be to offer the plugin in the JED and not bloat the core.

@brianteeman
Copy link
Copy Markdown
Contributor Author

Why? Then we should remove all the plugins that are for core fields. Honestly that makes zero sense.

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Aug 15, 2022

Because core has already over 200 extensions when you do a blank installation, which I think is more than enough. Instead of, we should try to push the extension directory.

richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 23, 2022
Add back the update SQL script "4.2.0-2022-07-07.sql" which were added with PR joomla#38244 and released with 4.2.0-rc1 and then later removed before 4.2.0 stable when that PR was reverted, and comment out their content.
richard67 added a commit to richard67/joomla-cms that referenced this pull request Aug 23, 2022
Add new update SQL script to correctly revert PR joomla#38244 when updating from a 4.2.0-rc1.
roland-d pushed a commit that referenced this pull request Aug 28, 2022
… RC 1 (#38567)

* Add back removed files 4.2.0-2022-07-07.sql

Add back the update SQL script "4.2.0-2022-07-07.sql" which were added with PR #38244 and released with 4.2.0-rc1 and then later removed before 4.2.0 stable when that PR was reverted, and comment out their content.

* Add new files 4.2.1-2022-08-23.sql

Add new update SQL script to correctly revert PR #38244 when updating from a 4.2.0-rc1.

* Delete obsolete plugin files and folders on update
@brianteeman brianteeman restored the menuitem branch November 9, 2022 20:25
brianteeman added a commit to brianteeman/joomla-cms that referenced this pull request Nov 11, 2022
This is a combination of joomla#38244 and joomla#38426
@brianteeman brianteeman deleted the menuitem branch November 11, 2022 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Language Change This is for Translators

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants