-
☆ A M B ☆
- 222 Posts
I have inherited a site where the former dev "customized" an Extra with some extra db fields and a good bit of ExtJS. They did this within the Extra's files, so when the Extra was updated, it wiped out all of the customizations (The extra was NOT created by the dev, it was merely extended within the Extra's js and processor files).
I am familiar with extending classes via the php class files, but what is the best way to add the ExtJS customizations so that don't get overwritten the next time the Extra is updated from Package Management?
There's really no good way to do this unless the Extra developer has made it customizable. Many Extras let you set the Tpl chunks and other elements used by the Extra so that you can duplicate and modify them and tell the Extra to use yours. However, this almost never extends to the Extra's files and certainly not to its DB tables.
You could preserve the Extra by moving all its files (in both the core/components and assets/components directories) to another location, renaming the DB tables and modifying the code to use the new name, and renaming the main objects in MODX (e.g., snippets, chunks, plugins, etc.), but then the upgrade would have no effect at all.
IOW, once you customize the files and/or DB tables of an Extra, it should never be upgraded.