Search
Other Articles Anywhere questions
Forum

AA: no output in J4

Hans-Günter Heiserholt's Avatar Hans-Günter Heiserholt
Hi Peter,

I'm updating to J4 and I have mutch trouble.

Act. I get no output from a converted J3 -> J4 migration.

In J3

{article nnn}{text}{/article} .... shows the content of article nnn,

In J4

{article id="nnn"}[text]{/article} ... shows "nothing".

When setting the empty-parm in AA configuration to "empty article", this phrase is displayed.

Let me explain a bit more.
The {article id="nnn"}....
refferers to an article(nnn) with a tab-structur inside.
In this, tabs with further articles, snippets are being refferered.

in J3 that runs perfect.
In J4 not.
Where is the failure?

PS: Joomla and all extentions are at the latest versions.
Peter van Westen's Avatar Peter van Westen ADMIN
If 'nnn' is the alias, use:
{article alias="nnn"}
The 'id' attribute is for the ID numbers
Please post a rating at the Joomla! Extensions Directory
Hans-Günter Heiserholt's Avatar Hans-Günter Heiserholt
Hi Peter,
no, the "nnn" stand for the article id.

The syntax goes
....
{article id="2969"}[text]{/article}
...

Here is an example how the complete structure goes.
Article 2612 is the base article with this content inside.
...
{tab title="TAB1"}
{article id="2970"}[text]{/article}
{tab title="TAB2"}
{snippet alias="Snip1"}
{tab title="TAB-Acc}
{accordion title="Acc1"}
Accordion 1 content
{accordion title="Acc2"}
Accordion 2 content
{snippet title="Snip_acc1"
{/accordions}
{tab title="TABn"}
...
{/tabs}

article 2970 contains

{tab title="TAB_1"}
{snippet alias="Snip_1"}
{tab title="TAB_2"}
{snippet alias="Snip_2"}
...
{tab title="TABn"}
{snippet alias="Snip_n"}
{/tabs}
...

Auch a structure works in J3
Peter van Westen's Avatar Peter van Westen ADMIN
Going by your code, you are missing the '=' sign.
Please post a rating at the Joomla! Extensions Directory
Hans-Günter Heiserholt's Avatar Hans-Günter Heiserholt
... thanks for the "=".

In this J4 test article all is well.

But it is strange, because in other articles it doesen't run, even the strukture-syntax is nearly the same. See the J4 examples down under.

First of all take a look at the J4 example: j4-2-x.hgh-web.de/index.php?view=article&id=2969
This is buildup, having the following structure.
{tab-2969 title="TAB1"}
{article id="2970"}[text]{/article}
{tab-2969 title="TAB2"}
Snippet with a parm. Actually not recognised by spippet! -> \1
{snippet alias="sds_lok_tender_mae" parm1="Innerhalb der Lok<->Tenderkupplung"}
tab-2969 title="TAB-Acc"}
{accordion-2969 title="Acc1"}
Accordion 1 content
{accordion-2969 title="Acc2"}
content of snippet with alias = csin2-csin3-txt-01
{snippet alias="csin2-csin3-txt-01"}
{/accordions}
{tab-2969 title="TABn"}
content of TABn
{/tabs}

Article 2970 contains:
{tab title="TAB_1-2970"}
{snippet id="1"}
{tab title="TAB_2-2970"}
{snippet id="2"}
{tab title="TABn-2970"}
{snippet id="3"}
{/tabs}


But in J4 there are still probs.

First, here is a look to the J3-Site:
moba-hgh.de/modellbahn/digital/decoder-t...5-ex-e75-der-db.html

In J4 nothing goes with the nested articles in the tab "Decoder" and also in the tab "Beleuchtung -> Ansicht"
j4-2-x.hgh-web.de/index.php?view=article&id=2611

The structure in the base article 2611 is:
{tab title="Decoder"}
{article id="2612"}{/article}	 
{tab title="Beleuchtung"}
{tab-bel title="Ansicht"}
{article id="2598"}{/article}	 
{tab-bel title="Tuning"}
{snippet alias="tun_bel_Ledtausch"}	 
{tab-bel title="Hinweis/e"}
{snippet alias="noData"}	 
{/tabs}	 
{tab title="Kupplung"}
{snippet alias="KupNEMSchacht"}	 
{tab title="Dachausrüstung"}
{tab-1 title="Stromabnehmer"}
{snippet alias="maeStaE306367"}	 
{tab-1 title="Sonstiges"}
{snippet alias="noData"}	 
{/tabs}
{tab title="Inside"}
{snippet alias="noData"}	 
{tab title="Probleme"}
{snippet alias="noData"}	 
{tab title="Hinweis/e"}
{snippet alias="noData"}	 
{tab title="Tuning-Σ"}
{snippet alias="tun_allg"}
{accordion-1 title="Umbauten am vorh. Decoder|closed"}
{snippet alias="tun_dec_34750_br175"}
{accordion-1 title="Umbau mit neuen Decoder"}
{snippet alias="tun_pcb"}
{accordion-1 title="Umbau Beleuchtung"}
{snippet alias="tun-bel_Ledtausch"}
{accordion-1 title="Umbau der Kupplungen"}
{snippet alias="nem-Kupl-umbau"}
{/accordions}
{/tabs}

Article 2612 structur is:
{tab-2612 title="Platine"}
{article id="2613"}[text]{/article}
{tab-2612 title="Funktionen"}
{snippet alias="maeDelFktF0"|34750}
{tab-2612 title="Digitales"}
{snippet alias="dig_delta_dc"}
{tab-2612 title="Montage"}
{snippet alias="merk_3x750"}
{tab-2612 title="Hinweis/e"}
{snippet alias="mae-dec-del-hinw"}
{tab-2612 title="Tuning"}
{snippet alias="tun_dec_34750_br175"}
{/tabs}

Article 2598 structur is:
Die Lokomotive ist mit LED-Beleuchtung und Dreilicht-Spitzenlicht und Zweilicht-Schlusslicht ausgestattet. Die unterschiedlichen Stirn-/Schlußbeleuchtungen sind fest gekoppelt, so dass immer gleichzeitig an der vorderen Seite das Stirnlicht (A-Licht) und an der rückwärtigen Seite das Schlusslicht aufleuchtet.

{accordion-2598 title="Stirnlicht"}
Die auf der Beleuchtungsplatine verbauten LEDs für das Stirnlicht, haben - wie es damals noch üblich war -  eine gelbe Lichtfarbe.

Die notwendigen Schutzwiderstände zur Strombegrenzung in den LEDs sind nicht auf der Platine verbaut. Sie befinden sich auf dem Decoderträger !

Die unteren LEDs des Spitzenlichtes sind auf der Platinen-Unterseite angebracht. Die LED für das obere Spitzenlicht sitzt seitlich am Rand der Oberseite.

Die Verteilung des Lichtes auf die Stirnlichter erfolgt über Lichtleiter.

{accordion-2598 title="Schlusslicht"}
Die auf der Unterseite der Beleuchtungsplatine verbauten LEDs für das Schlusslicht, haben eine rote Lichtfarbe. Sie sind in Reihe geschaltet. Die Verteilung des Lichtes erfolgt über Lichtleiter.

{accordion-2598 title="... weiteres"}
Weitere Beleuchtungen - wie z.B. eine Führerstandsbeleuchtung - sind nicht vorhanden.

{/accordions}

Article 2613 structure is:
{tab-2613 title="Ansicht"}
{article id="20"}{/article}
{tab-2613 title="Schaltplan"}
{snippet alias="noData"}
{tab-2613 title="Anschlüsse"}
{snippet alias="noData"}
{tab-2613 title="Merkmale"}
{snippet alias="merk_3x750" parm1="ein" parm2="VO011201B"}
{tab-2613 title="spez. Bauteile"}
{accordion title="Decoder-Chip 701.21x" open="false"}
{snippet alias="701-21x_pinout"}
{accordion title="Motortreiber"}
{snippet alias="noData"}
{accordion title="Gleichrichter-Diode"}
{snippet alias="FxDecStdDev"}
{/accordions}
{tab-2613 title="Hinweis/e"}
{snippet alias="noData"}
{tab-2613 title="Tuning"}
{snippet alias="tun_pcb"}
{/tabs}

Article 20 contains no further structures but this content:
<table border="0" style="width: 600px;">
	<tbody>
		<tr>
			<td><a href="images/content/stories/firmen/maerklin/0_dec/delta/son/306307_34750_dec-o.jpg" target="_blank" rel="noopener" type="image/jpeg" class="jcepopup zoom-bottom-right" data-mediabox="1" data-mediabox-group="34750" data-mediabox-title="Märklin: E75 [34750] Delta-Decoder" data-mediabox-caption="Oberseite"><img src="images/content/stories/firmen/maerklin/0_dec/delta/son/306307_34750_dec-ok.jpg" alt="306307 34750 dec o" width="300" height="78" /></a></td>
			<td><a href="images/content/stories/firmen/maerklin/0_dec/delta/son/306307_34750_dec-u.jpg" target="_blank" rel="noopener" type="image/jpeg" class="jcepopup zoom-bottom-right" data-mediabox="1" data-mediabox-group="34750" data-mediabox-title="Märklin: E75 [34750] Delta-Decoder" data-mediabox-caption="Unterseite"><img src="images/content/stories/firmen/maerklin/0_dec/delta/son/306307_34750_dec-uk.jpg" alt="306307 34750 dec u" width="300" height="76" /></a></td>
		</tr>
		<tr>
			<td class="hgh_beitrag_header" style="text-align: center;"><span style="font-size: 8pt;"><strong>Oberseite</strong></span></td>
			<td class="hgh_beitrag_header" style="text-align: center;"><span style="font-size: 8pt;"><strong>Unterseite</strong></span></td>
		</tr>
	</tbody>
</table>


When I set Debug On in J4, I get this output,when previewing the edited article 2612

404 Beitrag nicht gefunden
Call stack
# Function Location
1 () JROOT/components/com_content/src/Model/ArticleModel.php:218
2 Joomla\Component\Content\Site\Model\ArticleModel->getItem() JROOT/libraries/src/MVC/View/AbstractView.php:146
3 Joomla\CMS\MVC\View\AbstractView->get() JROOT/components/com_content/src/View/Article/HtmlView.php:110
4 Joomla\Component\Content\Site\View\Article\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:645
5 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_content/src/Controller/DisplayController.php:121
6 Joomla\Component\Content\Site\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:678
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
8 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/components/com_content/src/Dispatcher/Dispatcher.php:56
9 Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
10 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208
11 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:249
12 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
13 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
14 require_once() JROOT/index.php:32
Peter van Westen's Avatar Peter van Westen ADMIN
SO by the looks of it you have some crazy nesting going on....

Bring it down to the most simple example first. If that works add stuff.

Also when combining extensions and nesting one inside the other the system plugin ordering is very important. 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
Hans-Günter Heiserholt's Avatar Hans-Günter Heiserholt
Hi Peter,

I think I found the reason for my probs.

Let me explain:
In J3, I activated an AA-Option that allows also hidden articles to be displayed.

In J4, this option also exists, but is it not activ by default. When beeing activated, a system debug-dump is displayed.

Workaround:
Setting the article visibillity from "hidden" to "published".

At that moment, the article is displayed in normal ways.

So I think there is a bug in AA by the Ignore-Option: "Ignore Publish State".
In Yes-Mode, there come a up a Debug-Dump like this, when you try to display an article.
Call stack
# Function Location
1 () JROOT/components/com_content/src/Model/ArticleModel.php:218
2 Joomla\Component\Content\Site\Model\ArticleModel->getItem() JROOT/libraries/src/MVC/View/AbstractView.php:146
3 Joomla\CMS\MVC\View\AbstractView->get() JROOT/components/com_content/src/View/Article/HtmlView.php:110
4 Joomla\Component\Content\Site\View\Article\HtmlView->display() JROOT/libraries/src/MVC/Controller/BaseController.php:645
5 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_content/src/Controller/DisplayController.php:121
6 Joomla\Component\Content\Site\Controller\DisplayController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:678
7 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/libraries/src/Dispatcher/ComponentDispatcher.php:143
8 Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch() JROOT/components/com_content/src/Dispatcher/Dispatcher.php:56
9 Joomla\Component\Content\Site\Dispatcher\Dispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
10 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:208
11 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:249
12 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
13 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:61
14 require_once() JROOT/index.php:32

Try to check it in your system. I think its a bug.
Peter van Westen's Avatar Peter van Westen ADMIN
Articles Anywhere isn't actively creating a debug dump.
As you can see, there is also nothing concerning Articles Anywhere in the call stack.

I cannot reproduce the issue here.

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
Hans-Günter Heiserholt's Avatar Hans-Günter Heiserholt
Hi Peter,
thanks for the investigation.
Here is the ordered Super-Admin account data.
Confidential information:
(hidden)
In the file the {-article id="2970"}{/article} statement is outcommented.
When set to {article id="2970"}{/article} the dump comes up, when the article is previewed.
The article 2970 itself is "unpublished". When changing it to "published", all is well.

Good luck.
Peter van Westen's Avatar Peter van Westen ADMIN
I can't test anything on your setup, as your SSL certificate is not valid. Fix that first.

After that, can you also give me the (s)ftp access?
Please post a rating at the Joomla! Extensions Directory
Hans-Günter Heiserholt's Avatar Hans-Günter Heiserholt
Sorry Per for the SSL-circus,

The Website has beeing changed up now and it now has valid https://... access.

Confidential information:
(hidden)

Wish you good luck.😉
Peter van Westen's Avatar Peter van Westen ADMIN
This has nothing to do with Articles Anywhere.
It is due to whatever you have in article 1327. Try publishing that and viewing it on the frontend (or in the preview).

And something else, in article 2969 you are placing {tab} tags and opening and closing them in different table cells. That will cause all sorts of html structure issues.
Don't use tables unless you are showing a table of data.
Please post a rating at the Joomla! Extensions Directory
Hans-Günter Heiserholt's Avatar Hans-Günter Heiserholt
Hi Peter,

ok, I checked article 1327 and there is the problem again. It was in state "unpublished".
After changing it to "published", all is running.

That is exact the problem.
In AA, I have the option "Ignore Publish State" under the "Ignore tab" set to "Yes"

If so, there is the issue, when AA is trying to fetch an article, that has state "unpublished".
Peter van Westen's Avatar Peter van Westen ADMIN
I changed
{article id="1327"}{/article}
to
{article id="1327"}[text]{/article}
Working now.

The error is triggered because something else is choking on the unpublished article.
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