Search
Other Articles Anywhere questions
Forum

Content plugins and custom fields

Pieter-Jan de Vries's Avatar Pieter-Jan de Vries
Hey Peter,

For a client I'm developing a content plugin used in combination with using the free edition of Articles Anywhere v10.7.2. I'm using this simple instruction in a core Joomla! Content module:
{article alias="some-article"}
[introtext]
{/article}

First of all, it seems I have to enable 'Force Content Triggers' on the 'Advanced' tab of Articles Anywhere to have my 'onContentPrepare' method triggered for the article embedded in the module. Is that normal behavior or am I missing something?

Secondly, when my 'onContentPrepare' method does get triggered, the article I receive from Articles Anywhere does have a 'jcfields' property, but the fields within don't have their 'value' and 'rawvalue' properties set. The article also does not have an id, making it quite difficult to access the custom field values. So again: is that normal behavior or am I missing something?

Regards,
Pieter-Jan de Vries
Peter van Westen's Avatar Peter van Westen ADMIN
content plugins only work on content that get passed through the onContentPrepare triggers.
So depending on where you are using the Articles Anywhere code and possible the plugin ordering, yes, it is normal that you would have to switch that on.

Articles Anywhere should be passing the entire article object to the content plugins.
If that is not happening, then not sure why that is.

Going by your other question: what version of Joomla and Articles Anywhere are you using?
Please post a rating at the Joomla! Extensions Directory
Pieter-Jan de Vries's Avatar Pieter-Jan de Vries
Joomla 4.0.2 and the free edition of Articles Anywhere v10.7.2.
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
Pieter-Jan de Vries's Avatar Pieter-Jan de Vries
Thanx for the swift update. With this dev version I get the following two messages:
Notice: Undefined variable: ids in .../plugins/system/articlesanywhere/src/Articles.php on line 672
Warning: count(): Parameter must be an array or an object that implements Countable in .../plugins/system/articlesanywhere/src/Articles.php on line 672

Also, the previous version rendered the article, albeit without my content plugin working yet because of the inaccessible custom field data. This version does not render anything though.
Peter van Westen's Avatar Peter van Westen ADMIN
Well, there is a new dev version already.
But like I said, it is not ready yet. Especially the free version. I am in the process of making sure the free version doesn't contain pro code that breaks it.

I do NOT recommend using Articles Anywhere on Joomla 4 apart from testing and playing around with.
Please post a rating at the Joomla! Extensions Directory
Pieter-Jan de Vries's Avatar Pieter-Jan de Vries
Faster than lightning 🙂 And the good news is: all messages have disappeared and my content plugin now works.

I'll take your advice to heart and not use Articles Anywhere in a Joomla! 4 production environment, until it's offcially released.

Thanx so far for your help and fast responses.
Pieter-Jan de Vries's Avatar Pieter-Jan de Vries
I just tried to write a review on the JED, but after being logged in and clicking the 'Write a review button', I get the following message:
Error
Security checks determined you may be using an IP masking service, a VPN or a server is actively running on your internet router's public IP address. To continue, you need a different Internet connection.

I really don't know what's going on here, because I don't use a VPN and when I published my first own plugin a couple of weeks ago, I did not experience any problems whatsoever.
Peter van Westen's Avatar Peter van Westen ADMIN
🤷🏻‍♂️ Thanks for trying.
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