loadposition command - module in an article - shows but doesn't update

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 02, 2016 8:46 am

loadposition command - module in an article - shows but doesn't update

Post by ziidgaa » Sat Oct 12, 2019 9:17 pm

I've managed to use successfully a command {loadposition myposition} to show a module with custom position "myposition" created.
The problem is that when I do any changes to the module (that's being loaded with this loadposition command in an article), this changes won't show in the article UNLESS I would open the article and save it.
Basically - the module loads only once, no updates to the module are shown in the article that displays this module.
It's got nothing to do with clearing cache (as I do to reflect changes of pictures). I have (just in case) tried to set Prepare content (in the module options) to Yes.
I haven't tried to use the similar command, loadmodule instead (as embarrassingly, I can't figure out how it works) - not sure if that would be more responsive in article after any changes to the module would be done.

Any ideas how to get module displayed with every update without updating the article itself that contains the command loadposition? As I intend to have this module in many articles - it would make no sense if I would need to update all of them each time I change the module a bit.

User avatar
AMurray
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4951
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: loadposition command - module in an article - shows but doesn't update

Post by AMurray » Sat Oct 12, 2019 11:00 pm

With reference to: https://docs.joomla.org/How_do_you_put_ ... article%3F, perhaps more simply, "mod_type" is the module name e.g. mod_login. "the title" is the instance of that module (e.g.Login1, and you have to specify that if you have more than one instance of a module.

{loadmodule mod_name mod_instance_name} such as {loadmodule mod_login Login1}

However it might be easier to try a third-party extension - Modules Anywhere (Regular Labs):
https://extensions.joomla.org/extension ... -anywhere/

If it's not updating as expected, I would suggest it is a caching issue. Does the behaviour present itself the same in other browsers?
Regards,
--------------------------------------------------------------
A Murray
Millennium Falcon - it's the ship that made the Kessel run in less than 12 parsecs! The fastest hunk of junk in the galaxy.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26037
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: loadposition command - module in an article - shows but doesn't update

Post by Per Yngve Berg » Sun Oct 13, 2019 9:09 am

Check that the System File Cache Plugin is not enabled.

ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 02, 2016 8:46 am

Re: loadposition command - module in an article - shows but doesn't update

Post by ziidgaa » Mon Oct 14, 2019 10:18 am

AMurray wrote:
Sat Oct 12, 2019 11:00 pm
With reference to: https://docs.joomla.org/How_do_you_put_ ... article%3F, perhaps more simply, "mod_type" is the module name e.g. mod_login. "the title" is the instance of that module (e.g.Login1, and you have to specify that if you have more than one instance of a module.

{loadmodule mod_name mod_instance_name} such as {loadmodule mod_login Login1}

However it might be easier to try a third-party extension - Modules Anywhere (Regular Labs):
https://extensions.joomla.org/extension ... -anywhere/

If it's not updating as expected, I would suggest it is a caching issue. Does the behaviour present itself the same in other browsers?
I'm still not able to run the loadmodule command... :eek: I've been following the same documentation as you linked to before I posted here but it just doesn't work. It doesn't show anything. It only show loadposition command but doesn't update it in the article when the module is updated - still, unless I will re-save/update the article too.

I'm trying to avoid many extra extensions as I don't want to compromise the page load speed. But if there won't be any other solution, I may try it (I've also seen this specific extension before but didn't want to try until I'll try other options with this simple built-it command first).

I've tried to keep clearing cache before I posted here and it's not working. I've checked on a laptop - Google Chrome and on a phone - Safari and Chrome too... not updating anywhere.

Any ideas what I can be doing wrong that the loadmodule command doesn't work? (Although I'm still a bit in doubts if that will fix the problem even if I will make it run - it may not if it work similar way as the loadposition command.)
I simply write {loadposition creator} - that works but doesn't update in the article after the module is changed.
When I try {loadmodule mod_custom,creator} - nothing shows. Not even the command as a text - in case it was used incorrectly (so it feels like it wants to load it - but loads nothing)
For example - if I write {test} - it shows as literally "{test}" in the article. But {loadmodule mod_custom,creator} doesn't show (and same if I put a gap between like {loadmodule mod_custom, creator}).
Loadmodule seems to be half-way stuck...

ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 02, 2016 8:46 am

Re: loadposition command - module in an article - shows but doesn't update

Post by ziidgaa » Mon Oct 14, 2019 10:24 am

Per Yngve Berg wrote:
Sun Oct 13, 2019 9:09 am
Check that the System File Cache Plugin is not enabled.
I didn't find any such plugin. Only System - Page Cache plugin and it was disabled. I even tried to enable it and change some settings there to see if it makes any changes (for better or worse) but it did nothing. So now it's disabled again.
Clearing cache from browser didn't help (I was running this several times as I know it causes sometimes problems when I change images and they don't update on the front-end).

Is it a problem that I don't even have the plugin you mentioned? Only the one I described above...
Is there any global caching I should play with? I know there is something like that in the global settings - but I'm not sure what to set and if it would then do something bad elsewhere perhaps (I remember I had to do something with global caching of the page on my another website - but don't remember what it was - I think something with breadcrumbs not being updated when you go from one article to another or something like that... this global caching being set a specific way fixed that - that I remember).

ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 02, 2016 8:46 am

Re: loadposition command - module in an article - shows but doesn't update

Post by ziidgaa » Mon Oct 14, 2019 10:33 am

Well... I was trying to answer my own questions that I ask you guys here and I think I've fixed it.
I found the global cache settings: System > Global Configuration > System > Cache Settings > System Cache > OFF Caching Disabled (before it was ON - conservative).
Well, but I would appreciate if anyone knows what else this setting may affect as I may have fixed one thing and break some another... (I know I had some breadcrumbs problems on my another website in the past and had to fiddle with global caching too to fix it)
Thanks for any more info on this - if having System Cache OFF is ok in a long run or what could it be problematic for...

User avatar
AMurray
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4951
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: loadposition command - module in an article - shows but doesn't update

Post by AMurray » Mon Oct 14, 2019 11:41 pm

Further to this question, there is an inbuilt plug-in, for inserting modules in articles (so you needn't worry about getting the syntax correct using the short-code method.

This works similarly to "Modules Anywhere".

Not sure if it will help with the issue where the module doesn't seem to be refreshing with its updated content but is an easy way to insert the module in any case.
Regards,
--------------------------------------------------------------
A Murray
Millennium Falcon - it's the ship that made the Kessel run in less than 12 parsecs! The fastest hunk of junk in the galaxy.

User avatar
sozzled
Joomla! Exemplar
Joomla! Exemplar
Posts: 7875
Joined: Sun Jul 05, 2009 3:30 am
Location: Canberra, Australia
Contact:

Re: loadposition command - module in an article - shows but doesn't update

Post by sozzled » Tue Oct 15, 2019 1:45 am

ziidgaa wrote:
Mon Oct 14, 2019 10:33 am
Well... I was trying to answer my own questions that I ask you guys here and I think I've fixed it.

I found the global cache settings: System > Global Configuration > System > Cache Settings > System Cache > OFF Caching Disabled (before it was ON - conservative). Thanks for any more info on this - if having System Cache OFF is OK in a long run or what could it be problematic for ...
There are situations when using the cache may be useful and there are situations were using the cache will work against you. So, I would suggest that you do some research (e.g. https://www.google.com.au/search?&q=%22 ... AND+joomla).

I definitely would not be enabling any caching while you are building a website; caching just gets in the way. If the content of your website is dynamically changing (say, every few minutes) then there is no benefit; in those situations, people have to wait until the cache expires before they are able to receive the newest content from your website.
https://www.kuneze.com/blog
“If you think I’m wrong then say, ‘I think you’re wrong.’ If you say ‘You’re wrong!’, how do you know?” :)

ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 02, 2016 8:46 am

Re: loadposition command - module in an article - shows but doesn't update

Post by ziidgaa » Tue Oct 15, 2019 10:21 am

AMurray wrote:
Mon Oct 14, 2019 11:41 pm
Further to this question, there is an inbuilt plug-in, for inserting modules in articles (so you needn't worry about getting the syntax correct using the short-code method.

This works similarly to "Modules Anywhere".

Not sure if it will help with the issue where the module doesn't seem to be refreshing with its updated content but is an easy way to insert the module in any case.
I see - what is this plugin called? I'm quite happy with the loadposition command now when it works with global caching OFF but it's useful to know other methods for sure.

ziidgaa
Joomla! Apprentice
Joomla! Apprentice
Posts: 12
Joined: Mon May 02, 2016 8:46 am

Re: loadposition command - module in an article - shows but doesn't update

Post by ziidgaa » Tue Oct 15, 2019 10:25 am

sozzled wrote:
Tue Oct 15, 2019 1:45 am
There are situations when using the cache may be useful and there are situations were using the cache will work against you. So, I would suggest that you do some research (e.g. https://www.google.com.au/search?&q=%22 ... AND+joomla).

I definitely would not be enabling any caching while you are building a website; caching just gets in the way. If the content of your website is dynamically changing (say, every few minutes) then there is no benefit; in those situations, people have to wait until the cache expires before they are able to receive the newest content from your website.
I have done research already in the past (I had to deal with cache-related problems on another website) - but it's as I remember, in general, both curse and blessing anyway to have it on as well as off =)
I can try to change the cache timing (it's set up for 120 mins - I found out yesterday when I turned it completely OFF) - just to less to see if that would work when enabled. Because if so, then it doesn't matter too much if the content refreshes a bit later then the module is updated.
So then this whole problem of mine may be as well probably solved.

User avatar
AMurray
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 4951
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: loadposition command - module in an article - shows but doesn't update

Post by AMurray » Tue Oct 15, 2019 10:20 pm

In closing comment, it's called "Button - Module". It adds a button to your article editor. Allows you to select the module to insert from the module list.
Regards,
--------------------------------------------------------------
A Murray
Millennium Falcon - it's the ship that made the Kessel run in less than 12 parsecs! The fastest hunk of junk in the galaxy.


Post Reply

Return to “Administration Joomla! 3.x”