Closed sdrenth closed 1 year ago
I doubt it's intended in pdoTools to repeatedly trigger that event, so it would be great to also report it on that repo.
Like you say, ClientConfig can guard against it as well tho so will look at that.
Any updates regarding this?
Nope, we'll update this issue when that happens.
Hi @sdrenth, are you able to confirm if this issue has been resolved now?
I can replicate it with pdoTools 3.0.1-pl, so have added a check to the plugin to prevent it running more than once.
Summary
The plugin causes a loop which results in a fatal error:
Fatal error: Allowed memory size of 134217728 bytes exhausted
Step to reproduce
On MODX 3 using pdoTools 3.0.0-beta:
The error should now be triggered in both the MODX manager & frontend.
Observed behavior
The client config plugin listens to the
pdoToolsOnFenomInit
event, which triggers the parseProperties in the modMediaSource class which triggers the loop:Because the constructor of ModxPro\PdoTools\Parsing\Fenom\Fenom includes the invokeEvent:
This keeps triggering the clientconfig event resulting in the allowed memory exhausted error.
Expected behavior
I'd expect that the ClientConfig plugin is only triggered once for the pdoToolsOnFenomInit event.
Environment
MODX3 PDOTools 3.0.0 beta ClientConfig 2.3.0