Upgrading to 2.0.0-rc2
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
$388 per month—let's make that $500!Learn more
Upgrading to Revolution 2.0.0-rc-2¶
There are a few changes that have occurred in 2.0.0 RC-2 that will only apply to developers. If you are not:
- Writing translatable Extras for Revolution
- Writing plugins for Revolution
then you do not have to read this document.
First off, you might ask, "Why such a big change so late in the game?" Well, for one, we didnt realize the limitations of the RC1 lexicon system, and how it hampered Extras development and prevented us from having a stable multi-lingual distribution. What has been changed is:
- Dropped entirely the modLexiconTopic and modLexiconLanguage tables.
- Changed the 'topic' field on modLexiconEntry to be a varchar of the topic name.
- Refactored the entire modLexiconEntry logic so that now DB records of modLexiconEntry are only for overridden entries. Otherwise, they are cached from the lexicon topic files (the .inc.php files.)
- Redid the entire Lexicon Management section to now be a grid that only allows overriding of Entries. In other words, you can only edit existing entries, and when you edit them, they show up in green, signifying they have been overridden.
This means that the only Lexicon Entries stored in the database are overrides made by the user.
There are some real benefits to the new approach:
- Much, much easier translation abilities.
- Much faster lexicon loading time, since its file and array based rather than DB and Object based.
- You can now successfully change any lexicon entry without harming your upgrade path.
- Cuts down on the size of the core.transport.zip and massively decreases build and setup times.
- Much easier development. Just put a 'lexicon/' directory in your root of your Namespace's path (like most current Extras do) and build it in this format: 'lexicon/[language]/[topic].inc.php'. MODX will automatically parse that directory and browse it in Lexicon Management for you. You no longer need to 'buildLexicon' in your Extra's build scripts. However, this means that all packages using lexicons will need to be rebuilt for 2.0.0 RC-2. All that needs to be changed is that they no longer need to call 'modPackageBuilder::buildLexicon' in their build scripts, and their lexicon directories must be under the namespace path with the directory name 'lexicon' (similar to this component). We apologize for the inconvience, but we promise that you'll find the change much, much easier to develop in.
This also means that we will be packaging in core translations into SVN. All core translations will be committed there, similar to Evolution.
Deprecated Plugin Events have been removed in RC-2, and a few new events have been introduced. Please view the in-progress documentation on these events on the System Events page, or view an exhaustive list via the code here.
Note that some of these events are model-centric. This means they are executed from within the mod* classes. These are usually:
This means they will fire regardless of where they are executed. This allows you to fire events even when 3rd Party Components modify those objects, such as when a 3PC creates a user. Please see the documentation on each respective event for more information.