ReReplacer

Using php in ReReplacer conflicts with Helix Ultimate template

2 months 2 days ago #90451

Joris Lange's Avatar Joris Lange

Hi Peter,

This is the first time that I tried the php option in ReReplacer; I mean that I dynamically generate the "replacement" string. This works fine on a test site using the Protostar template, but it throws an error on another develop version of the same site which has the Helix Ultimate template (this should be the template on the final live site as well).

The error message is: syntax error, unexpected '$db' (T_VARIABLE), expecting identifier (T_STRING)

$db is the first variable in my code; when commenting that line the error is thrown on the next variable. I put ReReplacer before all other system plugins and after all other plugins but that did not help.

Are you aware of any possible conflicts of ReReplacer with HelixUltimate?

Kind regards, Frits

2 months 1 day ago #90453

Peter van Westen's Avatar Peter van Westen Admin

When running php code directly in the replacement in ReReplacer, ReReplacer will create the $db object for you. So that error should not happen.
Clearly the Helix Ultimate template (framework) is doing stuff to interfere...
Shouldn't you be asking the JoomShaper support for help on this?

2 months 1 day ago #90457

Joris Lange's Avatar Joris Lange

Thanks for your reply.
Peter van Westen wrote:

Shouldn't you be asking the JoomShaper support for help on this?

I certainly will do that. I just thought that you might have seen this issue before - and a solution.

Quite a lovely feature anyway, this php option. I am using it to create a menu item that has a dynamic url, depending on the users' language and usergroup(s). I have a static menu item (System > Url) that just says href="#" and this gets replaced by the dynamic value.

Kind regards,

Frits

2 months 1 day ago #90459

Peter van Westen's Avatar Peter van Westen Admin

Nice 👍