Search
Other Email Protector questions
Forum

work along with other plugins

Chris's Avatar Chris
Hello!
Coming back to the discussion I started a couple of days ago ( regularlabs.com/forum/presale/51788-emai...g-with-other-plugins ).
I use the email protector plugin together with a search an other search/replace plugin ( kubik-rubik.de/eor-easy-output-replacer )
I need the email protect plugin to go last, after the search/replace plugin has done its work.
Unfortunately, whatever order I put the plugins in, it does not work: the replace plugin stops to work.

I got in contact with the developer of this plugin to fin out that EOR runs with "onContentPrepare" and that the setting is "'onAfterRender' => ,". To remove the low priority does not help, we already tested that.

I'm not a programmer, so my knowledge is very limited (almost not existent), and I don't know if that information helps to solve the issue. But maybe you can help anyway.

Regards!
Chris
Chris's Avatar Chris
Of course I can provide ftp / backend access if needed
Peter van Westen's Avatar Peter van Westen ADMIN
Try using ReReplacer instead of EOR:
regularlabs.com/rereplacer
Please post a rating at the Joomla! Extensions Directory
Chris's Avatar Chris
Well, that is an easy answer. It's as easy as not satisfying.
Anyway, I'm going to try this.
Peter van Westen's Avatar Peter van Westen ADMIN
Yeah, sorry.
When 2 extensions don't work nicely together, you can quickly get into a situation where the issue is always "with the other extension".
It would also require me to try and figure out how EOR works and what it is doing, etc.
Seeing I have full insight in Email Protector and ReReplacer, and full freedom to apply any changes necessary, that's the easiest route for both of us.
Please post a rating at the Joomla! Extensions Directory
Chris's Avatar Chris
Hey,
just a short message to close the issue. ReReplacer and Email Protector work together flawlessly.

Thanks!
Chris's Avatar Chris
Sorry.. need to "open" this one again.
I transferred the settings from the dev environment to the productive website today and discovered the problem again:

Despite of ordering the re-replacer plugin (second last) and the email protector plugin (last) the desired behavior doesn't work and the re-replacer / email protector stops to work. or the like.

Here is the code of the site that should be removed completely by re-replacer:
<li class="list-inline-item"> <i class="fas fa-at"></i> <a href="mailto:"> </a> </li>
Creating a rule that does that gives the correct result. It works as long as the email protector plugin is _not_ activated.
The moment I activate email protector that little code snip gets displayed again.

I would think this is an ordering problem, but I checked the order a couple of times.

I hope you can help.

Thanks
Peter van Westen's Avatar Peter van Westen ADMIN
Are you placing this snippet inside an article or module?
If so, set the replacement to Search Area: Articles/Content.
If in a module, make sure you switch on the "Prepare Content" option in the module.

Ordering of system plugins: ReReplacer, Snippets, Email Protector
Please post a rating at the Joomla! Extensions Directory
Chris's Avatar Chris
Thanks for picking up!
No, the content is delivered by a component called custom tables. So the replace rule is limited to the body of the site, and it works as long the protector plugin is deactivated. Only after activation this specific rule stops working. Others - not related to Email addresses keep working.

I can't find a snippets system plugin, but the order of ReReplacer and Email Protector is exactly the way you mentioned.
Peter van Westen's Avatar Peter van Westen ADMIN
Can you give me (super) admin 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
Chris's Avatar Chris
Of course.. here we go:

Confidential information:
(hidden)


Switch on and off the eMail protector plugin to see the behavior.
Peter van Westen's Avatar Peter van Westen ADMIN
In the ReReplacer item I have set the "Enable in area" under "Search Area" to "Components". Now it is working.
Please post a rating at the Joomla! Extensions Directory
Chris's Avatar Chris
Thanks a lot.
I thought I tried this but I guess I was wrong about that.
Maybe you find time to explain why that change of the setting made it work. Seems to me as if it would not make any difference if the plugin does it's search & replace inside the body or inside the component area since the latter is a part of the body.

Thanks anyway!
Peter van Westen's Avatar Peter van Westen ADMIN
The "Enable in area" selection also determines at which stage in the rendering process the replacement is done:

onContentPrepare
- Content (Articles & Categories)

onAfterDispatch
- Components

onAfterRender
- Body
- Head
- Everywhere

Email Protector is als triggered at those stages.

Let's say you set the "Enable in area" of the ReReplacer item to "Everywhere".
When the content is checked at the onAfterDispatch, the ReReplacer item will not be handled, as it will do that later at the onAfterRender stage.
But Email Protector will see the email address at that onAfterDispatch and will handle (replace) it.
So when the onAfterRender stage is done, that ReReplacer item can no longer see what you are making it search for, as Email Protector already changed it.
Please post a rating at the Joomla! Extensions Directory
Chris's Avatar Chris
Got it!
Thanks for the details and the easy to understand explanation.
You can only post on the extension support forum if you have an active subscription and you log in

Buy a Pro subscription