Search
Other Articles Anywhere questions
Forum

Filtering by tag returns random results

Brent Critchfield's Avatar Brent Critchfield
I'm working on a layout that requires Articles Anywhere to filter by article tags. My code is
{articles tags="delivery-setup"}
, where delivery-setup is the tag alias. I've also tried using the actual tag name. In this example, Articles Anywhere returns a seemingly random collection of articles, some of which include the tag but some don't.

Filtering by category works fine, this problem seems to be restricted to tags.

This is a YooTheme template where I'm inserting this into the builder. Based on the number of threads in these forums dealing with YooTheme incompatibilities that was my first hunch, but I tested on a basic Joomla article on the site (not using the YooTheme builder) and got the same results.

Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Can you tell me on what frontend URL you are using Articles Anywhere and where I can see the issue?
Please post a rating at the Joomla! Extensions Directory
Peter van Westen's Avatar Peter van Westen ADMIN
PS: First update your Joomla setup to the latest version of Joomla 4!
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Oops, I though this site was already on our update system, so I hadn't paid attention to the versions. Everything has been updated now.

The site URL and login are in the confidential information, but you can see the frontend page at cff22.brentwoodvisual.com/index.php?opti...icle&id=4&Itemid=125 . Scroll down to the green section with the menu near the bottom. Each menu item also shows its assigned tags for testing purposes. The Pick Up Menu is filtered by category (Sandwiches) but the Delivery and Set Up Menu is filtered by tags only so you can see the error.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you also give me (s)ftp access so I can take a deeper look?
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Perfect - that did it. Thank you!
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, great 🙂
The fix will be included in the next release.
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Peter, I think I've got another bug for you. I'm using the following code and integrating Snippets and Articles Anywhere to loop through a list of categories, while also filtering via tag like we worked on above.
<div uk-grid>
        <div class="uk-width-auto">
                <ul class="uk-tab-left" uk-tab="connect: #menu-list; animation: uk-animation-fade">
<?php

$categories = ['Take Away Appetizers', 'Salads', 'Brunch', 'Sandwiches & Panini', 'Family Style Offerings', 'Hot Entrees', 'Sides', 'Petite Sweets', 'Fix it Yourself Bars'];

foreach($categories as $category)
{
        echo '<li><a href="#">' . $category . '</a></li>';
}
?>
</ul>
</div>

<div id="menu-list" class="uk-switcher uk-width-expand">
<?php        
foreach($categories as $category)
{
   echo '{snippet alias="menu" Category="' . $category . '" tag="pick-up"}';
}

?>
</div>
</div>

The code in my snippet is:
<div>
        <h3>%Category%</h3>
        <ul class="uk-list uk-list-large uk-column-1-2@s uk-margin-remove-vertical uk-scrollspy-inview menu-list">
                {articles category="%Category%" tag="%tag%"}
                <li>
                        <div class="uk-grid-small" uk-grid>
                                <div class="uk-width-expand uk-text-primary uk-margin-remove" {if price}uk-leader{/if}>[title]</div>
                                {if price}<div class="uk-text-secondary">[price]</div>{/if}
                        </div>
                        
                                <div class="uk-text-meta">[text]</div>
                        
                </li>
                {/articles}
        </ul>
</div>

This worked perfectly under the development version that you sent me, but upon updating to 12.5.0 Articles Anywhere will no longer accept the Category tag when it's inserted via PHP. If I take out %Category% from the {articles} tag and manually type in a category name it works fine.

I've reverted back to 12.4.2-dev2391176 and it's working again. The logins I gave you previously should be active again if you want to take a look.
Peter van Westen's Avatar Peter van Westen ADMIN
It is probably due to the system plugin ordering. Try changing the ordering of the plugins in question.
See: regularlabs.com/blog/242-plugin-order-is-important
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Yep, I did check that, and played with reversing the order of Articles Anywhere and Snippets plugins. It didn't have any effect, but rolling back to the dev version was the instant fix. This was also working before the 12.5.0 update without any change in plugin order.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (super) admin and (s)ftp access so I can take a look?
And tell me on what url I can see/reproduce the issue.
You can use the 'Confidential information' button in the forum editor to hide sensitive information.
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
I will try to look into this tomorrow...
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
No problem - it's working as-is with the previous version so I'm not in a huge rush. Thanks for your help.
Peter van Westen's Avatar Peter van Westen ADMIN
I see you currently have the latest version of Articles Anywhere installed.
I don't know what your menu is supposed to look like. So what is now not correct? Which stuff should/shouldn't be showing?
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Strange - it's reporting as 12.5.0 under Extension Manager, but if you look at the plugin you'll see that it's 12.4.2-dev2391176.

The menu is showing correctly now. If you reinstall 12.5.0 (as long as the behavior repeats itself) the menu items will disappear, because the %category% inside the Articles Anywhere tag does not get replaced properly in the snippet. It does get replaced properly in the H3 tag just above Articles Anywhere.



Peter van Westen's Avatar Peter van Westen ADMIN
Not sure if it is down to some stubborn caching.

But I updated Articles Anywhere to the latest: v12.5.0.
Cleaned the Joomla cache.
And the menu still looks fine...
Please post a rating at the Joomla! Extensions Directory
Brent Critchfield's Avatar Brent Critchfield
Ok, now I'm completely confused. I had played with caching too and wasn't getting anywhere.

When I installed the old dev version of the plugin I got an error about the RegularLabs Library plugin and had to reinstall that and Extension Manager. Perhaps there was a problem on that end.

Either way, it does seem to be working now with the current versions. Thanks for taking a look and sorry for wasting your time.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription