User tests: Successful: Unsuccessful:
Make sure the image is displayed AND ensure there are no empty list elements
Create a mod_articles module and set it to display just the article image - ensure one of the articles that would be displayed does NOT have an image
module is empty except for empty list elements
image is displayed for all articles that have an image AND there are no empty list elements
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Modules Front End |
The more I think about it the more I think that the if statement should just be removed completely. It doesnt serve any purpose (that i can see) and will just result in an empty list item which is invalid thml
Tested, but: none of the articles has an image so I end up with a list of five empty list items.
yes thats why I commented
The more I think about it the more I think that the if statement should just be removed completely. It doesnt serve any purpose (that i can see) and will just result in an empty list item which is invalid thml
or the if statement should be moved before the containing li element
@drmenzelit I'd appreciate your thoughts on moving the if statement
If we remove the if statement completely only the plugin events ($item->event->afterDisplayTitle, etc.) will be displayed, if all other elements are set to hide.
Movin the if statement before the li element can end in an empty ul. Probably the better solution.
| Labels |
Added:
PR-5.4-dev
|
||
I have updated the PR and description/test instructions so that the if statement now wraps the li element instead of being inside the li. This additionally ensure that we have no empty list elements which would be both invalid html and an accessibility failure
I have tested this and found a problem: If there is no image there is an empty list item. This part: || $params->get('img_intro_full') checks whether to use the intro or full image but it does not check that either image actually exists.
I have not tested this item.
I confirm that if an article (the second in my test) have not the image there is an empty list item:
I have not tested this item.I confirm that if an article (the second in my test) have not the image there is an empty list item:
@Razzo1987 Really not tested? Or just forgotten to select the right test result before submitting?
| Labels |
Added:
bug
|
||
I have updated the pr so that there is no empty list element if there is no image
phpcs: Expected at least 1 space before "||" (latest one) 😭
Thanks @brianteeman, I'll write that in the chat we used for testing yesterday and maybe we can get two in quickly
I have tested this item ✅ successfully on 62b6cfe
Test 1
Test 2
Test 3
@brianteeman, I am retesting this PR and I must be doing something wrong this time but I am getting the images to come up in the BEFORE condition (except the one that of course doesn't have an image in the article):
(I reduced browser view so that I can get it to fit all in the screenshot)
Environment:
Using Joomla 5.4 Nightly Build from this morning - clean install, Blog Sample Data, French Added, Multilingual Sample Data, Joomla Patch Tester 4.4 and Regular Labs Clean Cache and that's it.
I have tested this item ✅ successfully on 62b6cfe
I was able to test it again and get it to work! (Thanks @brianteeman - it was a caching issue)
| Status | Pending | ⇒ | Ready to Commit |
RTC
| Status | Ready to Commit | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-01-25 12:11:44 |
| Closed_By | ⇒ | richard67 | |
| Labels |
Added:
RTC
|
||
Thanks @brianteeman for this bug fix, and @exlemor and @Razzo1987 for testing and @drmenzelit for advice.
thanks
I have tested this item ✅ successfully on 985771f
I have successfully tested this PR. Nice catch @brianteeman and thank you for the fix.
Happy Holidays!
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46598.