-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Articles: Inserted modules should be referenced by ID, not by title #19360
Comments
If you reference by ID, you could take off the type as that information isn't needed anymore. And of course the same error could happen with an ID as well if someone accidentally deletes a module. Only that he will have no luck recreating it once he notices the error. |
Correct. However, maybe that's helpful information? I don't really care.
What I do is to put a note on modules I use in articles "This is used in an article". So I wouldn't delete it by accident. |
+1 for supporting syntax using the module ID. There are tradeoffs in each direction if you're using syntax using module names or IDs, but I'd suggest the ID syntax is less prone to being broken by other site changes short of deleting the module (FWIW in one of my older projects this was feature requested because of how easily the plugin was broken by changing the title on referenced content, and because that plugin supported title references to content which might have duplicate titles so the right reference wouldn't resolve but using ID it always would). |
Makes sense to me. Should be a relatively easy change to make the plugin insert the id instead of the module title. Its all JS in here
and then update the plugin itself to recognise id and not title |
The JS is only one part. The content plugin currently doesn't support referencing the ID so that needs to be added to it and the syntax needs to be distinguishable from the old loadmodule behavior (may be possible by checking for integer). |
something like |
Definitely should have some sort of |
then some kind of this syntax maybe ? |
without the JS side #19362 |
Set to "closed" on behalf of @Quy by The JTracker Application at issues.joomla.org/joomla-cms/19360 |
see PR #19362 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/19360. |
It works in latest Joomla with: {loadmoduleid 200} 200 specify module id |
Please update the doc: |
@hakanara (Anybody can write docs or update them. You, too ;-) Just register on https://docs.joomla.org/ and start.) |
Thank you very much @ReLater . I didn't know that but I would like to learn :-) |
Steps to reproduce the issue
Insert a module into an article.
The module gets referenced by its type and name.
However, when changing the name of the module (maybe unknowing that the module is used in an article), this doesn't work anymore.
Rather the ID should be used which doesn't change.
Expected result
Module identified by module type and ID:
{loadmodule mod_example,123}
Actual result
Module indentified by module type and name
{loadmodule mod_example,Module title}
System information (as much as possible)
Joomla 3.8.3
Additional comments
--
The text was updated successfully, but these errors were encountered: