roryg / ElementHelper

Element Helper is a MODx Revolution plugin for automatically creating elements from static files without the MODx manager.
27 stars 10 forks source link

Triggering event #44

Closed ghost closed 8 years ago

ghost commented 8 years ago

Is there a reason why this is triggered with OnXXPageInit? It might be better to use something the user has to invoke, such as clearing the cach, OnSiteRefresh.

JayCarney commented 8 years ago

It just makes it nice when you're doing dev, so if you have live-reload as part of your dev stack, and get it to refresh the page when you save a chunk/template/snippet you will get the new version included in the fresh request.

The plugin is also only triggered on admin users, and only when the static files have been modified or are new, so I've found it to be very nice to work with overall. We actually leave it installed on production sites and use deployments via beanstalk, then all we have to do is log in to the manager and all the updates have been included.

ghost commented 8 years ago

I see. Very nice, will see if it works better when using the correct plugin code! What do you recommend, the 2.0 alpha, or the 1.3.3 with the patched plugin code?

JayCarney commented 8 years ago

I haven't actually had any experience with the 2.0 version unfortunately. But we use the 1.3.3 patched version on all of our sites and haven't had any issues.

I'd recommend making sure elementhelper.auto_remove_elements is set to false, I've had a few issues with that in the past, but other than that I find it very solid.

ghost commented 8 years ago

Thank you. The 2.0 alpha doesn't appear to work at all in Revo 2.5.0, but the patched 1.3.3 works just fine.

ghost commented 8 years ago

Are you on Slack (modx.org)? I have some questions.

JayCarney commented 8 years ago

yep, username is just "jason" (my username is really annoying because every time somebody talks to Jason Coward I get an alert haha)