4 minutes reading time (880 words)

It Started With A Glitch - How I Helped Improve The Joomla Core


Not every feature works the first time we use it on a website, but sometimes there really is an issue that cannot be fixed by changing settings. This is the story of how my "glitch" became a code change in the Joomla Core.


Back in November I wrote an article for the Joomla Community Magazine called Explore the Core - Smart Search and Search results settings and I used my development website to show some examples of how the Smart Search functionality works. It was quite an enjoyable experience and more often than not, there is something new to be discovered in taking a deep dive into a Joomla feature.

Smart Search provides a number of options for displaying search results and one of them is to include the Intro Image along with the title and any metadata selected. So far, so good, only when I tested this feature, the image didn’t always show. In fact more often than not I was seeing the title and no image displayed.

Looking closer at the search results I could see that there was an <img src=”/” /> tag appearing, but it was just that. Nothing in the source. So I added a class, and then I got <img class=’dantest’ /> but still no image was appearing.

We Are The World

If you’ve ever struggled with making something work, then there’s probably a few “next steps” that you’ve followed. These probably include hitting Google, or your search engine of choice, Stack Exchange, the Joomla Forum, or one of the channels on Joomla Mattermost. After much searching I asked a question in the Joomla Improvers channel.

Dan: “Question about Smart Search. I have checked all settings and even used a fresh Joomla 4 installation but can't get images to show in results. It shows an img tag with "/" as the source. And I have images set as intro and full in the articles.”

Very soon afterwards I was advised to try out a different template, in case mine was overriding some code. I did this and had no joy. In fact I went further. My installation was still running on Joomla 4, so I went through creating a totally new installation Joomla 5, added content and Intro & Full images, and it still didn’t work.

Ask A Person Who Knows

Getting to know people in the community is really helpful as sometimes a general shout-out in a channel doesn’t yield the answer you’re looking for. It was suggested I contact Hannes Papenberg who is responsible for the Production Department Bug Squad - a crack team of Joomla Users who check reported issues to see if they are bugs and to do something about getting them resolved.

After a few questions and some further testing, it was obvious that the problem (for me) wasn’t going away, so I raised an Issue on GitHub. I’ve done this before when I thought I’d found something wrong with Contacts. That time I was quickly sent away to look at the “undocumented feature”, though I still think it was something to be checked.

This time I opened an Issue, and about 10 days later I saw a red “Bug” tag added.

Big Issue

There’s quite a lot of issues in the Joomla GitHub. Currently 850 open issues. It takes time for the Bug Squad to work their way down the list and to replicate the reported “bug”.

Once a bug has been replicated, a change to the code is proposed and this is known as a Pull Request. GitHub describes this as: “...a proposal to merge a set of changes from one branch into another. In a pull request, collaborators can review and discuss the proposed set of changes before they integrate the changes into the main codebase.

Hannes debugged my issue and found the culprit in the code. It was a really small change, but significant for me. If there was a space in the filename then Smart Search couldn’t deal with it. The code change was proposed and became Pull Request #42725

Merging and Testing

So what next? I found a bug, it’s been fixed in a branch of the Joomla code, and several developers were able to test and verify the issue had been resolved.

Hannes says: “We need 2 successful tests to confirm a solution. After those successful tests, a maintainer also still has to review the code and check it.”

And once the code has been reviewed it can be merged into the core.

Bug Squad

Looking at the Issues page on GitHub you’ll see some issues have comments against them, but others need checking and verifying. Hannes says, “... we simply need people who test pull requests, evaluate reported tickets and if they can code (which they don't have to) they can also fix issues.”

To join the Joomla Bug Squad, signin, or signup at https://joomlacommunity.cloud.mattermost.com/ and head for the PD Bug Squad channel.

Do I Have An Issue?

While the Issue channel does contain reports of bugs, the best place to start is the Joomla Forum where a host of expert Joomla users answer questions daily. Most times an answer on the forum will resolve your issue. And if not, someone should point you in the right direction.

Local Community liaisons, what are they and do you...
Turning home-built into an on-brand illustrated sh...


Already Registered? Login Here
No comments made yet. Be the first to submit a comment

By accepting you will be accessing a service provided by a third-party external to https://magazine.joomla.org/