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

Issue with Capistrano #13

Open kinaz opened 11 years ago

kinaz commented 11 years ago

Hi,

I found a problem with Capistrano.

Capistrano is a deployment ruby script which basically does the following:

1) It connects via ssh to the production server 2) From the production server, it pulls from a git repository the latest version of the modx app and creates a new folder on the server named after the timestamp of the deploy 3) Create a symbolic link "current" (which is the root of the website) which points to the last folder deployed and empty core/cache folder

So you find something like this on the server:

/httpdocs/current/ -> /httpdocs/releases/1232164184/ (latest version pulled) (previous versions): /httpdocs/releases/1232164423/ /httpdocs/releases/4332243234/

If ElementHelper is enabled, after a capistrano deploy elements are not created properly in Modx, (some are missing, randomly)

Is there any kind of control on elements' timestamp?

I know this is quite a particular setup...

roryg commented 11 years ago

A contributor added a caching feature a couple of versions ago that uses the file modification time to determine if an elements file has been updated or not. I'm wondering if that might be linked to the issue you're having? You could try removing the plugin and installing version 1.2.2 found here which doesn't have this feature http://modx.com/extras/package/elementhelper23?version=5102a5fef24554585f000051 Instead it just goes through all the files and updates the elements regardless of timestamp.

Let me know if that helps or not

exside commented 11 years ago

Hm, should work in my opinion, but what is your elementhelper path for the elements? If the paths change due to the use of capistrano (as I interpret the above) then the elements path would have to be adjusted each time you deploy something with capistrano?