Search
Other Articles Anywhere questions
Forum

Multiple Snippets with Articles Anywhere inside

dee's Avatar dee
Dear Pete, hope you are doing fine.

We are facing a very strange problem.
There is one page which contains multiple Snippets (with different snippet-IDs) and each snippet has ArticlesAnywhere Code inside.
Snippets with ID "A" are all rendered correctly, but Snippets with ID "B" are rendered only until the surounding ArticlesAnywhere tag (ArticlesAnywhere IS firing, but the content to be rendered is returned EMPTY - testet this by chaning the placeholder in the AA-Plugin).
The IDs of the articles to be rendered exist, the articles show on their respective pages up.

Is this something which sounds familiar to you? Or is this maybe a bug or misconfiguration on my side?
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
dee's Avatar dee
...this fixed another problem (disappearing images inside AA), but the problem in question remains

Changed it like so:
...
- System - RegularLabs Library
...
- System - RegularLabs Snippets
- System - RegularLabs Articles Anywhere
...
Peter van Westen's Avatar Peter van Westen ADMIN
The way Joomla works, is that plugins are called in turn, at a few stages during the rendering process.
Depending on where you have the plugin tags, you will get into situations where you reach the limits of the ping-ponging (plugin A placing code for plugin B placing code for plugin A placing code for plugin B...).

Also, with Snippets and Articles Anywhere you might be running into other issues where Snippets is trying to interpret the tags meant for Articles Anywhere or the other way round.

What code do you have in your snippet that is causing issues?
Please post a rating at the Joomla! Extensions Directory
dee's Avatar dee
1. There are custom fields, rendered through YooTheme Pro, and so far all works very well.

2. On one custom field "Left Side" there is
{snippet alias="team" team-id="364"}

3. On the other "Right Side" there is
{snippet alias="kontaktbox" kontaktbox-id="366"}

4. Snippet "team" has the following code:
<div class="uk-grid tm-grid-expand uk-grid-margin snippet-team">{articles id="%team-id%" tags="%tag%" ordering="%order%"}
<div class="uk-width-1-2@m uk-grid-margin {if uneven}uk-first-column{/if}">
<div class="uk-panel uk-margin">
<div class="uk-grid tm-grid-expand uk-grid-margin">
<div class="uk-width-1-2 uk-width-1-5@s uk-width-1-3@m uk-first-column">
<div class="uk-margin">[image-intro]</div>
</div>
<div class="uk-grid-item-match uk-flex-middle uk-width-1-2 uk-width-4-5@s uk-width-2-3@m team">
<div class="uk-panel uk-width-1-1">
<div class="team_name">[title]</div>
<div class="uk-panel uk-text-small team_title uk-margin">[titel-name:value]</div>
{if tel}
<div class="uk-panel kontakte_zeile_margin  team_tel uk-margin-remove-vertical">Tel: 089 / 55-[tel-ohne-vorwahl]</div>
{/if} {if mail}
<div class="uk-panel uk-text-small team_mail uk-margin"><a href="mailto:[e-mail-nur-vor-dem:value]@domain.de">[e-mail-nur-vor-dem]@domain.de</a></div>
{/if} {if hinweis}
<div class="uk-panel uk-text-small team_mail uk-margin">[hinweise]</div>
{/if}</div>
</div>
</div>
</div>
</div>
{/articles}</div>

5. Snippet "kontaktbox" has the following code:
<div class="kontaktbox uk-grid tm-grid-expand uk-grid-margin">{articles id="%kontaktbox-id%" tags="%tag%" ordering="%order%"}
<div class="uk-grid-item-match uk-width-1-1@s uk-width-1-2@m uk-width-1-3@l kontakte uk-first-column">
<div class="uk-tile-primary uk-tile">
<h5 class="uk-text-primary uk-margin-remove-vertical">[title]</h5>
<div class="uk-panel uk-text-primary">[titel-name:value]</div>
<div class="uk-panel sprechstunden_zeile_margin uk-margin-remove-vertical">[sprechstunde]</div>
<div class="uk-panel uk-text-primary kontakte_zeile_margin uk-margin-remove-vertical">Tel: 089 / 55-[tel-ohne-vorwahl]</div>
<div class="uk-panel uk-margin"><a href="mailto:[e-mail-nur-vor-dem:value]@domain.de">[e-mail-nur-vor-dem]@domain.de</a></div>
</div>
</div>
{/articles}</div>

...both snippets running alone work so far, first time not working is using them on one page together

Thanks for looking into it!
dee's Avatar dee
quick follow-up:

If I remove
tags="%tag%"
from snippet "kontaktbox" it all works!
...but "tags" is needed in some pages
Peter van Westen's Avatar Peter van Westen ADMIN
Have you got a default value for tags? If not, try setting it to: *
Please post a rating at the Joomla! Extensions Directory
dee's Avatar dee
yep we got that already...
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
dee's Avatar dee
sure, hope this is enough info - thanks!

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
dee's Avatar dee
Thanks Peter! Working now!
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
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription