ClientConfig icon indicating copy to clipboard operation
ClientConfig copied to clipboard

The plugin is not running for the onMODXInit event

Open ShevArtV opened this issue 10 months ago • 4 comments

Greetings, in Modx 3, with the Client Config installed and using pdoTools and Fenom, the following is observed: the first static plugin in the queue does not work. If you disable the pdoToolsOnFenomInit event for the Client Config plugin, then everything starts working as it should.

ShevArtV avatar Feb 23 '25 11:02 ShevArtV

Hi @ShevArtV, thanks for reporting the issue.

Could you clarify what you mean by the first "static" plugin? e.g. file based? It doesn't happen with a regular plugin?

We previously had to mitigate a pdoTools bug where it was looping the event, perhaps something has changed and that's having an effect? Could you try commenting this part out in your ClientConfig plugin and see if that makes a difference? https://github.com/modmore/ClientConfig/blob/master/core/components/clientconfig/elements/plugins/clientconfig.plugin.php#L39-L46

muzzwood avatar Feb 24 '25 03:02 muzzwood

'static' plugin refers to a file-based plugin. This issue does not occur with regular plugins.

Commenting out the specified lines does not make a difference. The only thing that helps is disabling the pdoToolsOnFenomInit event."

ShevArtV avatar Feb 24 '25 08:02 ShevArtV

It sounds like it's related to this: https://github.com/modx-pro/pdoTools/issues/380

muzzwood avatar Feb 25 '25 01:02 muzzwood

Yes, it appears that the issue is related to pdoTools. Firstly, making the plugin for the pdoToolsOnFenomInit event static causes the site to crash immediately. Secondly, if a plugin for this event exists, the first static plugin in the queue fails to work.

ShevArtV avatar Feb 25 '25 07:02 ShevArtV