Macrotone Blogs

Macrotone blogs upon Joomla, our products and other matters.

Joomla Smart Search

b2ap3 icon joomlaI have seen a number of posts on the web about the ‘Smart Search’ feature, most of which are about using it and configuring it.  My experience had found one peculiarity of using the feature on Joomla 2.5 which I am sure cannot just be me.

The peculiarity I refer to is the fact that it is ‘always’ necessary to create a menu item for the ‘Smart search’,  otherwise the search just directs one to the usual (old) search page.  It doesn’t matter if one disables the ‘old’ search plugin, one is still directed to the ‘old’ search result. This is something I first noticed with the initial release of Joomla 2.5, and put it down to a ‘quirk’, it being a ‘new’ feature, but it is still present even with the recent updates.

I have been unable to find any reference to this peculiarity anywhere, despite extensive searching (pun intended).  There is a brief reference to a menu item being required IF a search filter is used, but I have found it necessary even if a filter is not being used.

The only way in which I have managed to get it working every time is as follows:

Create a Menu Item from the "Smart Search" category. NOTE: there is a category of Menu Item called "Search" and a different Category of Menu Item called "Smart Search". Be sure you are in the category called "Smart Search."  (To make it more confusing, the item itself is called "Search" but just be sure you are in the "Smart Search" category.)

After selecting this item type, in the Required Settings, choose your (optional) Search Filter and Save.

This menu item can be placed in a hidden menu if you do not desire a specific search page displayed on the site.  The page doesn't have to exist on its own but it has to be there for the ‘smart search’ to operate properly within a module.

Note that I have not seen this peculiarity on Joomla 3.1 which doesn’t require the menu item to be present.

Tags:

Joomla -€“ Creating a component '€˜Smart Search'€™ Language file

b2ap3 icon joomlaHaving created a custom Finder (Smart search) plugin for our Issue Tracker component, there was one small problem left which was that the supplied language translations were not being picked up by the ‘Smart Search module’.

Having spent time ensuring that the format of the language files were correct and that they were being placed in the correct directory on installation and were named as the documentation suggested. 

Continue reading

Nested tables, MySQL and Joomla Smart Search.

b2ap3 icon joomlaWe have been looking at refining a finder plugin in Joomla which is accessing a nested MySQL table.  Nothing complex about that one would think.

However the desire was to expand out the different sub record titles into a single ‘title’ comprised of the individual sub record titles linked together offered a few ‘opportunities’ for want of a different word!

To explain further.  We have a classic nested table structure as follows:

Continue reading

Joomla 2.5 Language overrides

b2ap3 icon joomlaI was recently asked a question about language templates and how custom changes made by a site would be over ridden on a component update. This got me thinking and it seems that Joomla already provides a convenient way to create language overrides.  I am not talking about language overrides just specific strings being used instead of the standard supplied text.

This can all be done in the Joomla administrator.

Continue reading

sh404SEF housekeeping and€“ shURLS

9539.png We turn our attention today to the question of shURLs. To quote Anythingdigital “shURLs — formerly called pageID — are tiny URLs automatically created by sh404SEF®. Their short length make them ideal for use in social networking sites or on print media such as business cards or promotional items.”

They seem to come preconfigured to be generated (at least we have no recollection of turning their generation on) by sh404SEF for certain Joomla components and we have observed the large number of ‘automatically’ created short URLS on our modest site.  We ourselves do not tend to use them, but what is interesting is the contents of these ‘short URLs’.  The vast majority were for subjects that have no relevance for our site what so ever and typically for subjects that would fall under the category of ‘SPAM’. They (most of the invalid/unrequired/unrelated ones) seem to be trying to ‘redirect’ or send email to external locations.

Continue reading

Joomla JCE editor problems

jceFor some time I have been experiencing a few problems with the changing  of formatting within articles etc.  Typically these showed themselves as repeating space characters being converted to '’non breaking spaces’ (&nbsp). and then after saving a second time being converted to ‘A caret’ characters.

Web searches showed that many others have seen these types of problems as well, although there were no definitive solutions, despite many suggestions that didn’t work when we tried them.

Other examples we have seen include occurrences such as the removal of <br> tags by <p> tags enclosing a non breaking space character were also seen.

These tend to become very annoying over time so we think we might now have a solution that seems to work for us.

To resolve <br> & <br clear="all" /> tags getting deleted or converted to <p></p>

Go to components >> JCE >> Editor Global Configuration >> Formatting and Display >> Container element >> Change to : No container and parameter on enter

To resolve Contiguous (repeated) spaces getting deleted.

Go to components >> JCE >> Editor Global Configuration >> Cleanup and output >> Entity Encoding >> Change to Named

To ensure all <br> tags are retained over HTML cleanup.

Go to components >> JCE >> Editor Profile>>Default >> Editor Parameters >> Advanced>>Extended Elements>>Add: br

Joomla - Breadcrumb links

b2ap3 icon joomlaWe recently noticed a peculiarity on our site with some breadcrumb links containing certain entries which when clicked displayed a page in ‘Joomla Blog’ format containing articles which generally would not be seen, except under specific circumstances.  Nothing security related in our situation but potentially could be.  These pages were certainly not explicitly created on our site and were obviously generated ‘on the fly’.

Using the standard Joomla breadcrumbs generation there is nothing specific that one can configure/change to resolve this type of problem so it was down to some possibly lengthy investigation as to the cause(s).

To resolve the problem we discovered that the URL being used was from a SEF plugin/component (in our case SH404SEF) which contained several aliases and it was necessary to remove the specific URL (plus aliases).  Then once we had done this and  purged the page cache, the page and its breadcrumb links displayed as correctly as expected without the additional link that had been present before.

[Note: If there are several aliases for a speciifc SH404SEF URL then one might possibly be able to choose one of the alternative aliases which no not show the 'additional unrequired' breadcrumb link, but this is not necessarily the general situation and may involve some trial and error.]

Before reaching this point we did wonder about how the link to the page from an article had been created, having previously been selected from the article, so we changed it to be via the menu link.  This is not really required, but the observation is that a name(s) of the 'additional/unwanted' breadcrumb link(s) related to the category to which the article was attributed and it does make the site a little cleaner perhaps. 

On a large site with many pages such a situation may be difficult to discover and there may be many such situations, but we are unaware of any current method to discover these other than careful page inspection.  It was bad enough on our modest site, let alone a really large site.

Google translate and Joomla

We have recently placed a new module upon our site to enable page translations using the Google translate service for the benefit of our foreign visitors.

Whilst working fine in Firefox (version 19.0.2), Opera (12.14) and Internet Explorer (10), with the translated page being present with our usual page layout format, we notice that when using Google Chrome browser (version 25.0.1364.172 m), that the information is translated, but the page formatting is completely lost.  This may be a conflict with the inbuilt translation available with the Chrome browser.

There are a few aspects to this.

1. Google translate is not retaining the site 'format' hence the display is not as on the originating site.

2. Being a site in Europe we are obliged to have a message re the use of Cookies upon the site. When the page is translated it then appears to come from our site but in fact is displayed from the 'translate.googleusercontent.com' site.  Since the 'translation site' is using 'our template the request for Cookie acceptance is initiated, regardless of whether the user has accepted cookies previously, since it is effectively 'a new site'.  However even accepting the cookie does not remove the 'acceptance message' since there appears to be some form of page 'caching' upon the translate.googleusercontent.com site.  This cache we have no control over hence the 'cookie' message is still displayed on the translated page.

[See blog post about associate problem with cache and cookie handling.]

EU Cookie regulations and Joomla system page cache

We have noticed a problem on our site related to cookie handling and the Firefox (version 19.0.2) and Chrome (version 25.0.1364.172 m) and the cookies generated by the EU cookie plugin required to meet EU regulations.

The problem, which is (we believe) caused by the use of the Joomla system (page) cache manifest itself either as no EU message being displayed, to enable acceptance of the cookie, or as the cookie acceptance appearing to be ignored (even though it has been accepted) and the message continuing to be displayed.  Option changes to the system cache plugin do not make any difference.

Not a show stopper but a problem none the less.  The problem although first noticed on our own site is also evident on other sites complying with the EU regulations and using cookies.

Continue reading

CSS Sprites

For those that have been using our Issue Tracker component, they are aware that we have invested a certain amount of time improving the look of the front end screens of the component.   With the emphasis now turning to the changes required for Joomla3.x we recently looked at using CSS sprites.

If you are not familiar with Sprites, they can be thought of as one ‘large’ image containing lots of smaller images.  The theory being that loading one image is a lot quicker than loading a lot of small images and save bandwidth.  The individual images enclosed within the large ‘image’ are accessed by specifying its position within the larger file.

There is a simple article which explains this is slightly more detail, so it is not worth repeating it here. In actual fact there are a lot of articles scattered over the web that go into the use of Sprites, of mixed usage.

One might think that it is a lot of work creating the ‘combined image’ and its references, but there are a number of sites on the web that perform most of the work for you.  We have tried a number of them with varying success.  One of the better ones (in our opinion) is Zero Sprites which creates quite a nice compact combined image and generates the required CSS lines for one to customise and use in ones application.

We have got this all working ourselves, but observe that on a number of web sites we visit that even if we use sprites ourselves the impact on the site as a whole is often minimal since there are so many other ‘components/modules’ etc.  in use that our images are often only a fraction of those in use.  Having said that there is a saying that ‘every little bit helps’ so with that in mind the work involved must be worth it.

Go To Top

The Macrotone Consulting Web site would like to use cookies to store information on your computer, to improve our website. Cookies used for the essential operation of the site have already been set. To find out more about the cookies we use and how to delete them, see our Privacy Policy.

I accept cookies from this site.