-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[com_modules] Add page (menuitem) filter #9987
[com_modules] Add page (menuitem) filter #9987
Conversation
@@ -124,6 +124,7 @@ COM_MODULES_OPTION_POSITION_TEMPLATE_DEFINED="Template" | |||
COM_MODULES_OPTION_POSITION_USER_DEFINED="User" | |||
COM_MODULES_OPTION_SELECT_CLIENT="- Select Type -" | |||
COM_MODULES_OPTION_SELECT_MODULE="- Select Type -" | |||
COM_MODULES_OPTION_SELECT_PAGE="- Select Page -" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to check but dont we usually say Menu Item?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes but in this case the column name is "Pages" that's why i used this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blast this is tricky. The title of the option is Menu Assignment and then the values are all Page xxx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes - confusing indeed - I am happy to go with your suggestion for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, so it can be tested as it is
Just as with position it is possible to set pages to ::none:: This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
ok, you're right, makes sense. will check that. |
ok done. We have an option to select the modules not assigned to any pages now too. |
I have tested this item ✅ successfully on fe3b973 Just think it would be better if instead of "No pages" it would be the same as with positions and be ":: None ::" This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
IMO that could be confusing. Because that is a term used in the positions. We could use "None" (instead of "No pages") like in the column when you have a module not assigned to any menu if you prefer. Please tell me what you prefer, i can easily chnage it. |
I will leave it to someone else to decide which option This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
@brianteeman BTW did you test on postgresql ? |
Not yet - i forgot - testing that for you now |
As far as I can see it works well in postgres |
I have tested this item ✅ successfully on fe3b973 Just think it would be better if instead of "No pages" it would be the same as with positions and be ":: None ::" This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
All good. Just think it would be better if instead of "No pages" it would be the same as with positions and be ":: None ::" This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
@andrepereiradasilva if you make the change to ::none:: I will set this RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
This PR has received new commits. CC: @brianteeman, @MDXBilal12 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
@brianteeman done. See 28183f5 |
Not at my desk but looking at the code doesn't that produce ::::none::::
|
I have tested this item ✅ successfully on 28183f5 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
As I said I was checking from my phone ;) All good This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
Setting RTC as the only change since the last tests was a language string This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
I have tested this item ✅ successfully on 7e37a19 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
RTC - cool new feature This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
// If user selected the modules not assigned to any page (menu item). | ||
if ((int) $menuItemId === -1) | ||
{ | ||
$query->having('MIN(mm.menuid) IS NULL'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mm.menuid should be enclosed in a quoteName statement.
Taking off RTC for now until code fixes are implemented. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
This PR has received new commits. CC: @brianteeman, @grhcj, @MDXBilal12 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
done @roland-d |
@roland-d can we have the RTc back on this one. Only did the changes you requested. |
@andrepereiradasilva I am having a conflict: error: patch failed: layouts/joomla/searchtools/default/filters.php:11 Would you mind checking if there is a conflict with current staging? |
strange let me update the branch |
This PR has received new commits. CC: @brianteeman, @grhcj, @MDXBilal12 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
ok @roland-d try now. |
@andrepereiradasilva The fatal error is gone but I have a whitespace error now :)
In addition I have a failure in my test, see this screenshot: The menu is called About Joomla and I think we should keep the same name rather than an internal name. What do you think? |
This PR has received new commits. CC: @brianteeman, @grhcj, @MDXBilal12 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9987. |
you're more efficient than travis! whitespace removed |
I think so. But thats's all across joomla menu field selector (in all views that use it). |
I will make a PR to change that in all menu select fields |
If we do that everywhere then best to resolve that in a separate email
|
This should be tested in other databases than MySQL (PostgreSQL or MSSQL). Because we may have to add more fields to the select statement due to the added having clause. |
Thanks everybody |
Pull Request for Improvement.
Summary of Changes
One filter, IMO, is missing in com_modules: the page filter.
I think this filter is very handy since it can show all modules for a particular menu item.
Testing Instructions
Note: The filter query needs to be tested in postgresql too (it's a query with several subqueries).
Observations
There actually an inconsistency in admin modules list: the "Pages" column exist and shouldn't.
Note that inconsistency already exists because the column is already there.
So i guess a PR to correct that should also remove this filter from the admin modules list.