Article evrywhere in sourcerer php but text...

Search
Other Bug Reports questions
Forum

Article evrywhere in sourcerer php but text without html tags

Frédéric Delavie's Avatar Frédéric Delavie
Hi,

I try this code in an article :
{source}
<?php
if($blablabla == 1) {
?>
{article id="36"}{/article}
<?php
}
?>
{/source}

When $blablabla = 1, I see the text of the article (id=36) BUT without html tags.

Can you help me seeing the text with the html tags ?

Best regards.
Peter van Westen's Avatar Peter van Westen ADMIN
Make sure the Articles Anywhere system plugin is ordered after Sourcerer.

Or alternatively do something like:
{source}<?php
if($blablabla == 1) {
  echo '{' . 'article id="36"}{/' . 'article}';
}
?>{/source}
Please post a rating at the Joomla! Extensions Directory
Frédéric Delavie's Avatar Frédéric Delavie
Hi,

Thanks for the quick response.
I've tested both ways, and I always get the same result.
I have the text of the article, but without the html tags.
I've also tested with Cassiopeia, and still get the same result.

Thanks
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
Frédéric Delavie's Avatar Frédéric Delavie
Confidential information:
(hidden)
Peter van Westen's Avatar Peter van Westen ADMIN
Ah, so you are using Articles Anywhere to include article 35 in a form component.
In article35 you are placing Sourcerer code which in turn places an Articles Anywhere tag to include article 36.

Because the form component doesn't run its content through the content plugins, the system plugins only get 1 chance to look at the content.
This makes it impossible to create a sequence of Articles Anywhere -> Sourcerer -> Articles Anywhere.

In this case you could use Snippets instead of Articles Anywhere for certain parts.

I have installed Snippets on your setup and created 2 snippets for the form ok/not ok messages.
And this system plugin ordering:
Please post a rating at the Joomla! Extensions Directory
Frédéric Delavie's Avatar Frédéric Delavie
I'd completely forgotten that I had this Articles Anywhere -> Sourcerer -> Articles Anywhere successsion.

Many thanks.

You are wonderful.
Peter van Westen's Avatar Peter van Westen ADMIN
PS: when using plugin tags in articles (or other content that is passed through the Joomla content prepare event), the Regular Labs system plugins get trigger 2 or 3 times. So then you can have things like: Articles Anywhere -> Sourcerer -> Articles Anywhere (and even more complex).
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in