Unit/System Tests Language Change b/c break PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar carlitorweb
carlitorweb
2 Jun 2024

Pull Request for #42385

Summary of Changes

Move the assignment of modules from #__module_menu to the new menu_assignment in #__modules. Now the menu assignment section for a module will have 2 new options for exlude child pages. For joomla updates there wil not be any visual change, since all assigned modules in #__module_menu will be copy to menu_assignment.

Testing Instructions

Preparation steps

  • This pull request make some changes in the database, you will need to update an existing joomla site with the prebuilt package. The faster way, just copy the sentences and execute it directly in your sql client (just do not forget to adjust the prefix #_). Minimum you need execute the follow:
ALTER TABLE `#__modules` ADD COLUMN `menu_assignment` text;
  • Apply the patch if you did not used the prebuilt package update

Administrator -> Site Modules

  • The column "Pages", need have the exact same values you have before. If you only executed the minimum sql sentence, then will show for all modules "None" and that is expected.
  • Filter by some Menu Item
  • Order by pages in asc/desc
  • Create/Delete a module
  • Batch a module. In both case (move/copy) check the assigned menu items stay in their position.

Administrator -> Site Modules -> Edit a module

  • Go to the tab Menu Assignment and choose a module assigment option. Save and check these options remain as you edited.
  • Save and close. Repeat Administrator -> Site Modules test

Administrator -> Menus -> Edit a menu item

  • Go to the tab Module Assignment and check the Display column show the correct tag about what module is assignment or not to the menu.
  • Turn on/off the Unassigned Modules toggle and check the module hide or shown according with yoru selection.
  • Delete a menu item (make sure first is assigned to a module). Open the module and check the menu assignment is working. If you ca also in the #__modules table, search the menu_assignment value for this module and check the menu item id you just deleted, do not show up inside the assigned menu item array.

Frontend

  • Check if the current modules you have are working as before.
  • Edit a module and set as menu assignment one of the two new values, On all pages except those selected (do not include child pages) or Only on the pages selected (do not include child pages) . One way to test it, first assign a menu item to a parent category. Create a new category as child of this one. Then create a article inside this child category. Go to the frontend and check the module show up inside the parent category view, but not in the child category view or the article view.

Actual result BEFORE applying this Pull Request

All work as expected

Expected result AFTER applying this Pull Request

All work as expected. But now you can choose that do not render a module in child pages.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org: Chunk4x:Menu Assignment
  • No documentation changes for manual.joomla.org needed
avatar carlitorweb carlitorweb - open - 2 Jun 2024
avatar carlitorweb carlitorweb - change - 2 Jun 2024
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Jun 2024
Category SQL Administration com_admin Postgresql com_menus com_modules Language & Strings
avatar carlitorweb carlitorweb - change - 2 Jun 2024
Labels Added: Language Change PR-5.2-dev
avatar richard67
richard67 - comment - 2 Jun 2024

@carlitorweb If you want to add a new column to the modules table you also have to modify the CREATE TABLE statements in the base.sql files for new installations here https://github.com/joomla/joomla-cms/blob/5.2-dev/installation/sql/mysql/base.sql#L587 amd here https://github.com/joomla/joomla-cms/blob/5.2-dev/installation/sql/postgresql/base.sql#L611 . Please do it like it is for other columns of type text in the particular file. It does not need to specify NULL DEFAULT NULL for them.

avatar joomla-cms-bot joomla-cms-bot - change - 2 Jun 2024
Category SQL Administration com_admin Postgresql com_menus com_modules Language & Strings SQL Administration com_admin Postgresql com_menus com_modules Language & Strings Installation
avatar carlitorweb carlitorweb - change - 2 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 2 Jun 2024
avatar carlitorweb carlitorweb - change - 4 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 4 Jun 2024
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jun 2024
Category SQL Administration com_admin Postgresql com_menus com_modules Language & Strings Installation SQL Administration com_admin Postgresql com_menus com_modules Language & Strings Installation Libraries Front End Plugins
avatar carlitorweb carlitorweb - change - 5 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 5 Jun 2024
9afb011 5 Jun 2024 avatar carlitorweb cs
57d1cf3 5 Jun 2024 avatar carlitorweb cs
avatar joomla-cms-bot joomla-cms-bot - change - 5 Jun 2024
Category SQL Administration com_admin Postgresql com_menus com_modules Language & Strings Installation Libraries Front End Plugins SQL Administration com_admin Postgresql com_menus com_modules Language & Strings Installation Libraries Front End Plugins JavaScript Unit Tests
avatar carlitorweb carlitorweb - change - 5 Jun 2024
Labels Added: Unit/System Tests
avatar carlitorweb carlitorweb - change - 7 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 7 Jun 2024
avatar carlitorweb carlitorweb - change - 7 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 7 Jun 2024
avatar carlitorweb carlitorweb - change - 7 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 7 Jun 2024
avatar carlitorweb carlitorweb - change - 7 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 7 Jun 2024
avatar carlitorweb
carlitorweb - comment - 8 Jun 2024

@richard67 is possible for you give me any hint of why the drone is failing?

avatar brianteeman
brianteeman - comment - 8 Jun 2024

In your PR you are deleting the file cypress.config.dist.js - put that file back and the tests will run

avatar carlitorweb
carlitorweb - comment - 8 Jun 2024

In your PR you are deleting the file cypress.config.dist.js - put that file back and the tests will run

Thank ?

avatar carlitorweb carlitorweb - change - 9 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 9 Jun 2024
avatar carlitorweb carlitorweb - change - 9 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 9 Jun 2024
avatar carlitorweb carlitorweb - change - 9 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 9 Jun 2024
avatar carlitorweb carlitorweb - change - 9 Jun 2024
The description was changed
avatar carlitorweb carlitorweb - edited - 9 Jun 2024
avatar RickR2H RickR2H - test_item - 28 Jun 2024 - Tested successfully
avatar RickR2H
RickR2H - comment - 28 Jun 2024

I have tested this item ✅ successfully on 6d9530f

Thanks. Great idea!


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

avatar Hackwar
Hackwar - comment - 27 Jul 2024

This is a b/c break and can not be merged into 5.x. you will have to rebase this to 6.0. regardless of that, I don't think this is a good idea. Your check if you are on the page you want to be is extremely sketchy and will not work for a very large number of websites. Just checking on view and id is nowhere near reliable. Besides that, it is an anti-pattern to store this in a JSON. It prevents us from doing joins on the data.

avatar carlitorweb
carlitorweb - comment - 31 Jul 2024

Got it

avatar carlitorweb carlitorweb - change - 31 Jul 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-07-31 16:23:22
Closed_By carlitorweb
Labels Added: b/c break
avatar carlitorweb carlitorweb - close - 31 Jul 2024

Add a Comment

Login with GitHub to post a comment