joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.77k stars 3.65k forks source link

J!4.3.2 Category List Menu Item Unexpected Behavior #41040

Closed bascherz closed 1 year ago

bascherz commented 1 year ago

I am approaching this one cautiously since I suppose it could be an issue in either Joomla or one of the plugins I'm using.

Steps to reproduce the issue

I have a Category List menu item. The menu item has the category and subcategory descriptions disabled. There are no subcategories in this particular case. The one and only article in this category has an instance of the Simple Image Gallery (SIG) plugin {gallery}folder_path{/gallery} in its introtext section following one line of text. Unless I put the {gallery} tag after a Read More page separator, it's rendering at the Category List level (as if it were in the Category description).

Expected result

Neither of the plugins should get prepared.

Actual result

Of course, there is no gallery at that level (it's in the article), but I am getting two system messages from SIG complaining about the path not existing. The path is constructed using an Articles Anywhere (AA) {article} plugin instance that should only be rendered and will only work when the article is rendered since the AA plugin needs information about the article to create the valid folder_path. The article's introtext preceding the {gallery} tag is not displayed, but it does seem as if the content is being prepared within the (first) article in the category and that is causing the messages. Again, inserting a Read More separator before the {gallery} tag does eliminate the messages, so that's my workaround for now.

System information (as much as possible)

Joomla: 4.3.2 PHP: 8.1.18 DB: 10.6.14-MariaDB Simple Image Gallery: 4.2 (JoomlaWorks) Articles Anywhere: 14.0 PRO (Regular Labs)

Additional comments

So, if it's a Joomla issue, which I am inclined to believe, it means that article content preparation is being done when it shouldn't be. I don't see how it could be either plugin (SIG or AA) since those should only be "prepared" if the article gets rendered.

brianteeman commented 1 year ago

A simple test to see if it is Joomla or SIG would be to disable that plugin and then create an article which uses loadmodule and see if you still get an error

bascherz commented 1 year ago

It seems to me all that would test is whether the plugin ceases to function when disabled. Isn't THAT a Joomla function? And how can the loadmodule plugin be used to invoke a plugin (I mean, other than the loadmodule plugin itself)?

bascherz commented 1 year ago

As a less complicated test, I replaced the Articles Anywhere code with the physical path to the images folder. The gallery does not get rendered when the category list page is accessed, however something is happening because it took a while to load the page after this change, and the messages disappeared. So it appears SIG may be generating thumbnails in this case, which means the path has to be valid, which it isn't when using AA to generate it. Very esoteric issue. I'll post a similar report on the JoomlaWorks forums.

brianteeman commented 1 year ago

Closing as not a core joomla bug