You are currently browsing documentation for Diem 5.1 - Switch to version5.0

Using Diem master branch

There were several small changes in the Diem core that require some custom updates to migrate existing projects.

As we continued developing and releasing new updates, here are some guidelines to avoid issues when upgrading a running project to the latest master branch.

Template updates

Markdown upgrade

Due to the upgrade in PHP Markdown, which now declares a function Markdown, the markdown() helper function had to be renamed. As the other helpers are starting with an underscore (_tag(), _media(), ..), we decided to go with _markdown(). So if you use the markdown helper in your project templates, make sure to replace markdown() with _markdown().

Database updates

Media inconsistency with case sensitive filesystem

When using a case sensitive filesystem (default for most Unix / Linux distributions) the media library can get seriously messed up when files or folders have the same name as the DmMedia(Folder) file and rel_path columns are defined with the default utf8_general_ci collation. To fix this, the schema files were adjusted and to update an existing database, run

ALTER TABLE dm_media CHANGE file file VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin
ALTER TABLE dm_media_folder CHANGE rel_path rel_path VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_bin

Typo in dm_mail_template model definition

We recently discovered a typo in the dm_mail_template table: 'list_unsuscribe' is missing the B-character and was updated from list_unsuscribe to list_unsubscribe. All references to list_unsuscribe were updated (also in the .sqlite test database files). Just make sure to run a dm:setup after pulling the changes. To update a populated database, run

ALTER TABLE dm_mail_template_translation CHANGE list_unsuscribe list_unsubscribe TEXT

Length parameter in I18n behavior of DmMedia definition

Since Diem is designed to work with >2 character length cultures (eg. en_GB), the Doctrine I18n behavior needs the length parameter in it's definition as it will declare the 'lang' column as a CHAR(2). This is set for all Diem i18n declarations except for the DmMedia model, resulting in a wrong database definition. The model definition has been updated and to fix an existing database, run

ALTER TABLE dm_media_translation CHANGE lang lang CHAR(7)

Work in progress

This documentation page is not complete yet. We are working hard to make it available as soon as possible.

Questions and Feedback

If you need support or have a technical question, you can

  • Get help with the Google Group
  • Get help with the Forum
  • Come and chat on the #diem IRC channel on freenode

The documentation is hosted on GitHub. Feel free to submit issues and patches!

Fork Diem on GitHub