User tests: Successful: Unsuccessful:
This PR introduces the ability to manage associations for modules in the same way as articles, categories, and other types.
Why is this useful?
On Joomla sites, we often have blocks of information made as modules. If you want to change a module, e.g. the opening hours of a shop, Currently, you have to find the module, go into it, make a change, save it, find the next module, and so on. However, when the modules are associated, you can make changes to one module and then edit the others from there. This makes maintaining a website easier.
You have to update the javascript, because I have fixed a bug in the sidebyside script.
Setup a multilanguage site
Create a couple of modules
If you have set a module to a certain language you should be able to create new modules directly from the module. Create module is limited to a module of the same type. But you can select a different type of module. I did it this was, because the usual situation is to create a a module of the same type. In situations where you what a different module type you can do it with creating it on a different way and select the module. I am not sure if this is really a needed function but it is possible.
You can also use the associations component and manage it with the side by side view. Pretty much the save functionality as when you use the module view.
I have found a couple of things that I don't think are intended, as well as some bugs. I haven't fixed them all in this PR, but I will fix them in another PR later this week.
This needs to be documented, and I will do so once I am sure I have covered all areas. To make it run, you need to put a lot of pieces together. We have documentation for version 3.x, but not for versions 4 and above.
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_associations com_modules Language & Strings JavaScript Repository NPM Change Libraries |
| Labels |
Added:
Language Change
NPM Resource Changed
PR-6.1-dev
|
||
I have tested this item ✅ successfully on 3d0618b
Installed Multilingual Sample Data
Edited existing modules adding associations
Created new modules and created associated modules on-the-fly (same type)
Created modules of different types and associated them
Edited associated module on-the-fly
Checked Associations component
All worked as described and expected
When installing the multilingual sample data wouldnt it be a good example if the two menu modules were associated
I have tested this item 🔴 unsuccessfully on 3d0618b
video coming soon showing it doesnt work in the com_associations component
Doesnt happen all the time but I keep getting "1615 Prepared statement needs to be re-prepared"
Never have seen this message. Could you try it with articles or categories? I have my doubts that it has to do with the change I have done.
Or could you enable debugging mode so we can see which query results in this message?
I did some research and people had this problem could solve it with
SET GLOBAL table_definition_cache = 1024
I've never seen this problem before on the same server
I have tested this item ✅ successfully on 3d0618b
| Labels |
Added:
Feature
|
||
Thanks for fixing this.
Tested with JBT
Hi @rdeutz, during the PR Testing Group session, Heiko and I were testing your PR, and it seems to work great for what was listed in the Testing Instructions, but in the process of testing I found an issue :/
(I tried to see what would happen with the Administrator Modules and while I expected the Associations Tab NOT to be there, it (the Association Tab) WAS present + some weird additional chrome that I don't think should be there, perhaps a lack of filtering in the code for 'type of Modules'?)
Here is a quick video to show what I found/might be easier to understand that the above comment:
Hope that helps! thanks.
Good spot. You are correct - this functionality needs to exclude admin modules by ensuring that the queries have where client_id=0
@exlemor @muhme good find, I removed the admin module associations possibility
@brianteeman could you explain how you get it,please? From the screenshot it looks as you are hit save for the reference while you haven't added all information for the target.
it happened randomly either when opening the component OR when selecting the target but annoyingly not all the time
@rdeutz - Great fix, the Administrator Modules, no longer appear, but during today's (Saturday) Weekend PR Testing Group session with Krishna, I noticed a different odd issue:
I have a Main menu fr-FR site module and a Main menu en-GB site module, each assigned to their respective language with each having 2-3 menu entries - each having a Home entry, each assigned to sidebar-right, each set to Public, assigned to On All Pages and being identically configured in every respect except their language. I have associated one to the other.
The Main menu en-GB shows up as expected the Main menu fr-FR does not! 😱ðŸ˜
( Let me know if you need a video, I can do one later, but at the moment, I am in a noisy café ;( )
| Category | Administration com_associations com_modules Language & Strings JavaScript Repository NPM Change Libraries | ⇒ | Administration com_associations com_modules Language & Strings JavaScript Repository NPM Change Libraries Modules Front End |
@exlemor I fixed it here too
@rdeutz - well, it's getting better :) but 1 thing got fixed, 1 thing got broken :/
I updated to the newest package... and now:
the Main menu en-FR is SHOWING - victory 🎆
the Main menu en-GB only has 1 line/entry (Home) and doesn't have:
Template Settings
Select Category List for PR 46539
(yet I changed nothing since my previous testing).
| Category | Administration com_associations com_modules Language & Strings JavaScript Repository NPM Change Libraries Modules Front End | ⇒ | Administration com_associations com_modules Language & Strings JavaScript Repository NPM Change Libraries |
@brianteeman thanks for retesting.
it would be good if we had some cypress tests for this BUT i see that we dont have any at the moment for com_associations
I have tested this item ✅ successfully on fdb60da
I have successfully tested this now. Thanks @rdeutz for the fixes (sorry that I made you update it so many times).
I tested same module to same module in 2 different languages in the same Position and it worked well,
I tested same module in 2 different languages in different positions with different Access Levels and they showed up correctly,
I tested 1 module of 1 type in 1 position and another module of another type in a different position with different access levels and the associations all worked ! :)
I tested 1 module of 1 type in 1 position in 1 language, another module of another type in a different position in another, and a 3rd module of yet another type in a different position and access levels... ALL worked! :)
| Status | Pending | ⇒ | Ready to Commit |
RTC
I have tested this item ✅ successfully on 9aef3d7
Tested with JBT
npm ciCreate
Even inside the side-by-side view we have the Associatens tab with the ability to edit
¿ Perhaps less confusing to omit the Associatens tab in the site-by-site view?
I agree that can confuse people, but as it is the same as for other associations I would say that's outsite of the scope of this PR. We should fix it with another PR.
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-23 14:38:10 |
| Closed_By | ⇒ | HLeithner | |
| Labels |
Added:
RTC
|
||
Thanks.
And I hope you be able to write the documentation soon.
Ready to test, PHPStan error doesn't effect the testing