As most of you probably know, the main goal for the Joomla! "dot" releases, like 1.5.9, is to fix bugs. We try not to add features because adding features increases the risk that something will get broken in the process. And we really, really try to avoid that.
However, sometimes the line between a "bug" and a "feature" gets a little blurry. Here are two examples from version 1.5.9. These examples also give you an idea of some of the issues we deal with in the Bug Squad.
Using the "spacer" Parameter for Documentation
Those of you who have written extensions are probably familiar with the "spacer" parameter. It gives you the nice line between groups of parameters, as shown below:
The code for this example, in the file "modules/mod_mainmenu/mod_mainmenu.xml", is as follows:
<param description="" label="" default="" type="spacer" name="@spacer" />
There was a hidden feature here, even before 1.5.9, where you could change the line to text. For example, the following code ...
<param description="" label="" default="Enter the caching option below." type="spacer" name="@spacer" />
... would produce the following result:
However, this feature was not complete, because the text could not be translated using the Joomla! language files. So it wasn't ready to become "unhidden". In 1.5.9, this was changed so that this text is automatically translated, just like other parameter text. So, in version 1.5.9 the example above can be re-coded as follows:
<param description="" label="" default="PARAMTESTSPACER" type="spacer" name="@spacer" />
And then, to finish it, the language file "language/en-GB/en-GB.mod_mainmenu.ini" would be modified as follows:
PARAMTESTSPACER=Enter the caching option below.
So now this "hidden" feature can be properly introduced into Joomla! society. So, did we fix a bug or add a feature?
Category List Menu Item
Version 1.5.9 fixes some small issues with this layout and, in the process, makes some subtle changes to the user interface. Here is a screenshot from the Joomla! Sample site (Example Pages -> Section Table -> General).
The first change (in the red box) is that you can now see the field to be used for the filter: Title, Author, or Hits (in this case, Title). Before, the user had to guess or know what the filter field was.
If you change the "Display #" to 5, as shown above, click on the Article Title column to sort the list by title, and then press "Next" to navigate to page 2, you'll see the second change. Before 1.5.9, you lost the sort when you navigated to different pages. Now, the list stays sorted as you page through it.
This change causes an interesting little side effect. If you navigate away from the page, or even start a new browser session later, Joomla! will "remember" that you want this list sorted by Article Title. The reason is that it's now stored in the session cookie. That's probably a good thing in many cases. But what if you want to go back to the default sort for this list?
In this example, the default sort is "most recent first", which is not one of the column options. So, what do you do? It turns out, you can easily re-sort the list in the default order either by (1) changing the "Display #" or (2) entering anything (including space) into the Filter field and pressing Enter.
So, what do you think? Bug fix or feature?