Skip to content

@dmi3yy dmi3yy released this Jan 9, 2019 · 17 commits to 1.4.x since this release

Evolution CMS 1.4 LTS

  • support bugfix, compatible with 2.x branch, stability until 02.02.2020
  • support for critical security issues until 12.02.2021

If you used 3 level of nested Snippets you need Enable modifiers in settings!

This is a bad practice to use 3 levels of snippets, but if you really need to, then enable this setting.
I recommend if you need this behavior then write your snippet in which all the logic will be written in php it will work faster #977

Fixes and Updates in 1.4.8:

  • [refactor] (Extras) Updater - update only minor version(1.4 to 1.5, 2.0 to 2.1) (Update across major version (1.4 to 2.0 or 2.6 to 3.0 ) need do manual or from another plugin) (Dmi3yy)
  • [fix] (phpthumb): skipping svg files (Serg)
  • [fix] only if Enable modifiers in settings: modxcms#1200 only if Enable modifiers in settings: modxcms#1200 Double usage nested snippets. (Dmi3yy)
  • [fix] (core) buttons on welcome page, not work with Permission (Dmi3yy)
  • fix] Lightness navbar logo at width < 1200px (Nicola)
  • [fix] ser Icon Standardisation Suggestion #349 (Dmi3yy)
  • [refactor] clear (core) welcome.static @if (Dmi3yy)
  • [fix] (managermanager): path to the jquery file (Agel_Nash)
  • [feat] (manager) show template id in select on Document edit page (Dmi3yy)
  • [feat] (core): more compatible with 2.x branch (Agel_Nash)
  • [fix] (ElementsInTree) Categories are not sorted by name ASC (Nicola)
Assets 2
Pre-release

@dmi3yy dmi3yy released this Dec 23, 2018

MODX Evolution is dead! Long live Evolution CMS 2.0 using Laravel components

EVO 2.0

What is Evolution CMS 2.0?

Evolution CMS 2.0 is the latest release of the popular content management system. While it works like before, underneath it's a major overhaul of a CMS that began life in 2004. The code has been modernised using components from Laravel. Gone is the infamous DocumentParser class, a collection of disparate functions. In its place are structured components for cache, events, logging, file system, cofig, console, migrations, seeders, Blade templating, models Eloquent, Observers, ServiceProvider and more.

evo1 evo2

evo3 evo4

A bit of history

  • Developers Raymond Irving and Ryan Thrash unveiled the first release of MODX CMS in 2004.
  • After MODX Revolution was released in 2012, the original MODX CMS (now called MODX Evolution) received minimal updates from the MODX LLC development team. A group of keen users from the MODX community stepped up to continue development.
  • In March 2013, MODX Evolution 1.0.9 was released (https://habr.com/post/173667/), created exclusively by the community, under the leadership of Dmytro Lukianenko and Evgeny Borisov (who continue to work on Evo to this day). Releases were made under the auspices of MODX LCC (via modx.com).
  • In April 2017, MODX LCC cut its involvement with MODX Evolution (https://modx.com/blog/evolution-cms-has-a-new-home). Since then, our team has chosen its own development course.
  • In July 2017, we made the first release of the newly-renamed Evolution CMS. Evolution CMS 1.3.0 https://github.com/evolution-cms/evolution/releases/tag/1.3.0 had a completely redesigned interface and a number of new features that embodied the wishes of the community.
  • In November 2017, at the MODXpo conference, Lukianenko Dmytro successfully gave a report on progress with Evolution CMS (https://modcasts.video/videos/evo-cms-life-after-modx).
  • January 2018 saw the second major release of Evolution CMS 1.4.0 (https://github.com/evolution-cms/evolution/releases/tag/1.4.0), which radically changed a number of approaches in development.
  • In June 2018 it was decided to rewrite the Evolution CMS using Laravel components, with the prerequisite of maintaining full backward compatibility.
  • Now in December 2018 we are proud to present the first release of Evolution CMS 2.0.

A very important requirement was preserving backward compatibility with old versions of Evolution CMS and MODX Evolution, and we did it! You can safely upgrade your website from version 0.9.6 released in 2005 to 2.0. Only any code written without using the MODX Evolution API must be changed. All standard add-ons are updated and work with the new version.

Why did we choose Laravel?

There are many PHP frameworks but Laravel stood out because of its:

  • Extensive documentation
  • Active support
  • A lot of ready-made packages that can be used on Evolution 2.0

Initially, we saw only two ways: to continue working with obsolete Evolution code, while the community scattered and developers left the project, or to start writing a new CMS while keeping the old development paradigm people liked (the resource tree, chunks, snippets, TV parameters etc).

But we found the third option in which we gradually refactored the outdated code whilst maintaining backward compatibility.

Why Evolution CMS 2.0?

Evolution CMS is simple. You can understand how to work with it in a couple of evenings, and if you want to write code for it, the knowledge is the same as working with any Laravel project. Now you don't need to learn something that's only useful when working with Evolution CMS. This gives us universal appeal, as it's easy to switch between systems.

Will my existing Evolution CMS website continue to work?

Yes! Sites built the traditional way will continue to work, but the new flexibility and innovation won't be visible.

Great! How can I start migrating my site to the new features?

The small transition in Evolution CMS 2.0 from the $modx->config array to using the $modx->getConfig() method already allows you to manipulate the system settings of the engine, which are taken from the database. You can prepare for this change in your snippets right now, because the getConfig() method has been available since version 1.4.

Plugins for events can be created as before via the admin area or (new in Evolution CMS 2.0) through files. All this improves team development, simplifies project management through git. Developers will appreciate the convenience of storing the website configuration in Git.

Why should I learn something new and not stay with 1.4?

On version 1.4 you cannot install a site with one click. 1.4 doesn't have a good story for dev and production versions. Neither can you easily store templates in Git, or use database migrations etc. In version 2.0, this is all there.

Can you use ready-made Laravel components with Evolution CMS?

Yes!

Here is a package for generating Entity Relation diagrams from the database (https://github.com/beyondcode/laravel-er-diagram-generator) Installing it requires you to run composer:

composer require beyondcode/laravel-er-diagram-generator --dev

and create a provider file (core/custom/config/app/providers/Diagram_Generator. php) containing 1 line:.

return BeyondCode\ErdGenerator\ErdGeneratorServiceProvider::class;

Done!

Let's start:

New settings and advantages

  • The entire core/config folder and core/custom/config is already working with Laravel-style configs. To use the .env file, you must install the package vlucas/phpdotenv through the composer

  • Working with Composer: adding dependencies to core/custom/composer.json and executing composer upd from the core folder

  • For convenience, we will enable debugging tools: Debug and debugbar Tracy

    • Debug: create file core/custom/config/app/debug.php with code:
     <?php 
     	return true;
    • function dump shows information in a beautiful way:
     <?php 
     	dump($modx);
    • Folder with logs core/storege/logs

    • Tracy: create file core/custom/config/tracy/active.php with code:

     <?php 
     	return 'manager';

tracy

Working with Templates and Chunks using the BLADE template engine from files without using the admin panel

Linking templates to the document without EVO admin panel

To work, we need to create a folder views in the root of the site, in which we will have templates. Actually and everything, no additional actions in the form of installing anything is required.

Plugin searches for templates in such order:

  • tpl-3_doc-5.blade.php - use this if resource id=5 and resource template=3;
  • doc-5.blade.php - use this if resource id=5;
  • tpl-3.blade.php - use this if resource template=3.

Working with standard elements using the BLADE template engine

Before you start working with BLADE, we strongly recommend that you read the BLADE documentation: https://laravel.com/docs/5.7/blade

//Display plaсeholder [*pagetitle*]:
{{ $documentObject['pagetitle'] }}
{{ $modx->documentObject['pagetitle'] }}

//Display TV plaсeholder
{{ $documentObject['image'] }}
{{ $modx->documentObject['image']['1'] }}

//Display URL [~2~]
{{ urlProcessor::makeUrl('2') }}
{{ $modx->makeUrl('2') }}
@makeUrl('2')

//Use system settings [(site_name)]
{{ $modx->getConfig('site_name') }}

//Use chunk from db: {{chunkFromDb}}
{{ $modx->getChunk('chunkFromDb') }} 

//Use chunk from file: (/views/partials/chunk.blade.php)
@include('partials.chunk', ['some' => 'data'])

//Use snippet: [[DocInfo? &docid=`2`]] 
{{ $modx->runSnippet('DocInfo',['docid' => '2']) }}

//Display the output of snippet without escaping html tags
{!! $modx->runSnippet('DocInfo',['docid' => '2']) !!}

//Standart MODX Parser
@evoParser('[*pagetitle*] [(site_name)] [[DocInfo]] {{chunkOld}}')

//Use of comments
{{-- This comment will not be in the final HTML --}}

//IF (All of the documentation for BLADE):
@for ($i = 1; $i <= 10; $i++)
  {{ $i }}
  @if ($i != 10)
  , 
  @endif
@endfor

//Work with php inside template (not recomended)
@php
  dump($modx); //beautiful var_dump
  $chunk = '{{ $data["param1"] }}';
  $chunk .= '{!! $data["param1"] !!}';
@endphp
//or
<?php
  dump($modx); //beautiful var_dump
  $chunk = '{{ $data["param1"] }}';
  $chunk .= '{!! $data["param1"] !!}';
?>

{{ $modx->tpl->parseChunk('@B_CODE:'.$chunk, ['param1' => 'value with "quote"']) }}
{{ time() }}

//Doclister with inline BLADE template
{!! $modx->runSnippet('DocLister',['parents' => '0', 'tpl' => '@B_CODE:{{ $data["pagetitle"] }}<br />']) !!}

//DocLister with BLADE template from file (/views/partials/doc-tpl.blade.php)
{!! $modx->runSnippet('DocLister',[
  'parents' => '2', 
	'tpl' => '@B_FILE:partials/doc-tpl',
	]) 
!!}

An example of a finished template using BLADE can be found here: https://github.com/dmi3yy/Evo-demosite-on-blade

Working with snippets and plugins from files without using the admin panel, as well as using Laravel events

In Evolution 2.0 we introduce a new entity package. This is a package of add-ons that may include snippets, plug-ins, chunks, modules. Modules now require you to register yourself through the admin area, but in the future we will redo them so that they automatically pull up, as well as all other elements.

1. Create our package(example):

Create file: core/custom/packages/example/src/ExampleServiceProvider.php

<?php namespace EvolutionCMS\Custom;

use EvolutionCMS\ServiceProvider;
use Event;

class ExampleServiceProvider extends ServiceProvider
{
    /**
     * If you specify an empty line, then snippets and chunks will have our usual naming convention.
     * Suppose a test file creates a chunk / snippet named test
     * If the namespace is specified, the test file will create a chunk / snippet named example#test
     * It also supports files in subfolders. Those. the test file from the subdir folder will create an item called subdir/test
     */

    protected $namespace = 'example';    
    
    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        $this->loadSnippetsFrom(
            dirname(__DIR__). '/snippets/',
            $this->namespace
        );

        $this->loadChunksFrom(
            dirname(__DIR__) . '/chunks/',
            $this->namespace
        );
	//Work with EVO and Laravel events:
        Event::listen('evolution.OnWebPageComplete', function($params) {
            echo '<p>Hello Evo events.</p>';
        });
	
	
    }
}

And so we added our package in which we specified the namespace for the snippet, which allows us to use the same snippet from different packages, without worrying about the fact that they will conflict. Immediately register the wiretapping of events (plugins) and specify the folder for the chunks.

2. Update composer for packages:

Create file: core/custom/composer.json

{
  "name": "evolutioncms/custom",
  "require": {
    "barryvdh/laravel-ide-helper": "~2.4",
    "vlucas/phpdotenv": "~2.2"
  },
  "autoload": {
    "psr-4": {
      "EvolutionCMS\\Custom\\": "packages/example/src/",
    }
  }
}

run command: composer upd from folder core

3. Register our package in EVO:

Create file: core/custom/config/app/providers/Package_Example.php

<?php
	return EvolutionCMS\Custom\ExampleServiceProvider::class;

4. Add chunk:

Create file: core/custom/packages/example/chunks/subdir/test.html

	Sample [+time+], [+content+]

The contents of this file is processed by the MODX parser, so you can use the usual MODX placeholders in it (an example with support for BLADE chunks will be later).

5. Add snippet:

Create file: core/custom/packages/example/snippet/subdir/test.php

<?php
return $modx->parseChunk('example2#subdir\test', [
    'time' => time(),
    'content' => 'zxc'
], '[+', '+]');

Call the snippet in the current example like this:

Parser MODX: [[example2#subdir\test]] 
Parser Blade: {{ $modx->runSnippet('example2#subdir\test') }}

But if you do not specify the namespace for the package and do not put the snippet in a subfolder, then we get all the usual option

[[test]]

Thus, we see that now you can fully work with Evo add-ons without having to store the code in the Database. At the same time leaving full backward compatibility with previous versions.

Work with DB, MODELS

All according to Laravel documentation https://laravel.com/docs/5.7/database, https://laravel.com/docs/5.7/eloquent Models in the core/src/Models with namespace EvolutionCMS\Models. Example:

$out = EvolutionCMS\Models\SiteContent::where('parent', '=', 0)
    ->orderBy('pagetitle', 'DESC')
    ->limit(10)
    ->get();
foreach ($out as $item) {
    echo "\t [ DOCUMENT #ID " . $item->id . ' ] ' . $item->pagetitle .PHP_EOL;
}

Coming soon:

  • Finish work on refactoring admin templates with full transfer to BLADE
  • More convenience for working with DEV PROD: migrations, sides, work through the console (artisan), solving the problem that DEV and PROD have different document IDs.
    artisan
  • Separating the core from the add-ons and transferring the selection of what to install by default at the time of installation (all that are chosen will be loaded and installed, and the rest will not be loaded).
  • Refining the widgets for out-of-date extras and upgrades, with multiple levels of priorities.
  • Better documentation and examples.

How you can help with testing

Send your wishes and bug reports to us on github: https://github.com/evolution-cms/evolution/issues
Be sure to provide:

  • Evolution CMS version
  • PHP version
  • MySQL version
  • The URL with the error
  • A screenshot of the error
  • Error messages from the log files
  • Step by step instructions to reproduce the bug

By sending us a great bug report, you will help us spend more time fixing the code, and not on figuring out what is not working.

Links

Assets 2

@dmi3yy dmi3yy released this Dec 10, 2018

Bug fix release

  • [U] phpThumb 1.3.3 (AgelxNash)
  • [U] ElementsInTree 1.5.10 (AgelxNash)
  • [U] DocLister 2.4.1 (AgelxNash)
  • [U] Formlister 1.8.1 (AgelxNash)
  • [U] DocInfo 0.4.1 (AgelxNash)
  • [U] FileSource 0.1 (Serg)
  • [U] Updated extras url from extras.evolution-cms.com to extras.evo.im (dmi3yy)
  • [U] Updated Help Version Noticies 1.4.2 - 1.4.7 (Nicola)
  • [U] Updated Languages files: English, Italian, German, Spanish and Polish
  • [I] Colorpicker added to tinymce full theme (mnoskov)
  • [I] New Enable Mootools Setting Option (Load Mootools.js in manager for backward compatibility) (Nicola)
  • [I] #887 Elements in ElementsInTree plugin sorted by name (Nicola)
  • [F] Fix #874 Remove fullstop at end of new password (Serg)
  • [F] Fix #888 The FileSource 0.1 is dependent on the mootools (Serg)
  • [F] Fix #892 Duplicated element name issue (Serg)
  • [F] Fix #882 broken extras module link in RSS check (Nicola)
  • [F] Fix for php7 in ddmultiplefields.php
  • [R] Format code save_user_processor (Serg)
  • Assets 2

    @dmi3yy dmi3yy released this Nov 2, 2018 · 85 commits to 1.4.x since this release

    Evolution CMS 1.4.6

    We decided before release 2.0 Alpha (very soon), on which we have been working hard lately, to devote some time to the 1.4.x branch, so meet release 1.4.6.
    The main works were aimed at stability of work + on safety, now the OutdatedExtrasCheck plugin takes information from the server, thus information on additions that have security problems will appear on the dashboard, which will give even more chances to learn about possible problems with security and fix it promptly.
    146ajaxsearch

    From interesting in 1.4.6:

    • Support for working with MySQL 8.0
    • Support for MySQL in strict mode
    • Support for working with PHP 7.3.0RC3
    • OutdatedExtrasCheck now checks outdated add-ons from the server and not locally.
    • A big DocLister update to version 2.4.0 (read more here: https://github.com/AgelxNash/DocLister/releases/tag/2.4.0)
    • update FormLister to 1.8.0
    • phpMailer has been updated to 6.0.5
    • phpthumb updated to 1.7.15
    • Finally removed mootools.js
    • Correct transfer of the event name when using nested events #844
    • Styled webAlertAndQuit #26
    • Added the ability to change the server MYSQL port #819
    • Check for a minimum version of AjaxSearch updated to version 1.12.1 (I strongly recommend updating AjaxSearch for security and virus protection purposes)
    • Added the ability to specify the login form in the light version for those who do not like the dark :)
    • Fixed a lot of errors, a full list of which can be found here: https://github.com/evolution-cms/evolution/blob/1.4.x/assets/docs/changelog.txt
    • Updated snippet DocInfo added new templid option more here: #806
    • Fixed bug with displaying SVG
    • Fixed URL generation for document created via MODxAPI
    • rewrote the methods: getChunk and parseChunk on those that DLTemplate
    • Fixed a bug in the getTemplateVar, getTemplateVars API with the choice of fields
    • Corrected: Managers do not show user groups
    • Multiple XSS vulnerabilities in admin panel closed
    Assets 2

    @dmi3yy dmi3yy released this Aug 7, 2018 · 208 commits to 1.4.x since this release

    In 1.4.5, the main attention was paid to correcting errors and also checking that everything worked as stably as possible.
    It was corrected a lot of mistakes and added some useful things.

    I also want to inform you that this is the last release of the 1.4 branch (there may be 1.4.6 if found critical errors or security problems) and now we are completely concentrating on work on the 2.0 branch that will work on Laravel components. In general, a lot of work in this direction already done: https://github.com/evolution-cms/evolution/commits/2.x, but there is still a lot of work that we plan to do before the release. I think that this autumn will be very saturated for EVO.

    Assets 2

    @dmi3yy dmi3yy released this Jun 8, 2018 · 662 commits to develop since this release

    Most interesting in this release:

    • Redesigned login page, as well as the added opportunity in the settings to specify the logo and background for this page
    • Added change of menu position: Top / left (can be changed in settings)
    • Fixed problem with scrolling on iOS devices
    • Added mobile mode for tinyMCE4
    • fixed problem (HTTP2 / SSL & check connection to server)
    • Singleton: instead of using global $ modx; it is recommended to use $ modx = EvolutionCMS ();
    • Fixed bug in the OnParseProperties event
    • TVs that are without a category remain in the local tab (when using the settings for moving TV)
    • Cross-Site Scripting https://www.exploit-db.com/exploits/44775/ Site name field XSS fix
    • Added support for Ctr + Alt + L for PhpStorm
    • fixed MySql strict mode error in the admin area
    • Added events for publication and removal of publication of documents
    • Reduced the size of the log that phpmailer produces on error
    • Now you can return data from different types of plug-ins, not just lines
    • Added OnBeforeMinifyCss event
    • Automatic set from in mail from the system settings if not specified

    login
    dash
    dash2
    settings

    Assets 2

    @dmi3yy dmi3yy released this Apr 4, 2018 · 524 commits to master since this release

    #New 4 mode for Default Theme
    1
    2
    3
    4

    You can set this in:

    • Configuration > Interface & features > Color Scheme
    • Users > Manager User > Tab user > Color Scheme
    • Sidebar-> TreeMenu -> last icon after trash

    Other things:

    • update DocLister (dmi3yy)
    • update Formlister (dmi3yy)
    • more checks in cli mode (Pathologic)
    • Missing introtext in Recent Resources (Piotr Matysiak)
    • Fix #603 bug for resource tree scrolling (Piotr Matysiak)
    • moved JS code to a file manager/media/script/main.js (Serg)
    • fix empty template on save tv (Serg)
    • [F] #577 Fix TinyMCE for [introtext] (Deesen)
    • Fix Extras buttons on 1.4.1 #571 (dmi3yy)
    • add user_agent info to manager_log (dmi3yy)
    • write manager IP address to manager_log (dmi3yy)
    • fix 577 TinyMCE introtext mode not work (dmi3yy)
    • fix notice (Serg)
    • fix TinyMCE disable after update to 1.4.2 (dmi3yy)
    • fix possible wrong path calculation (Pathologic)
    • [I] Wrap TinyMCE3 Toolbar (Mr B)
    • [F] Prevent long select option text values overflowing container (Mr B)
    • add view ability for ini files in manager files (dmi3yy)
    • fix demo site (Formlister, param reply-to) (dmi3yy)
    Assets 2
    Pre-release
    Pre-release

    @dmi3yy dmi3yy released this Apr 4, 2018

    Fix with @tags

    Assets 2

    @dmi3yy dmi3yy released this Mar 23, 2018 · 623 commits to master since this release

    Now you can install from comand line with composer:
    composer create-project evolutioncms/evolution

    https://youtu.be/nWTGSIxyz7s

    • php cli-install.php --database_server=localhost --database=db --database_user=dbuser --database_password=dbpass --table_prefix=evo_ --cmsadmin=admin --cmsadminemail=dmi3yy@gmail.com --cmspassword=123456 --language=ru --mode=new --installData=n --removeInstall=y (dmi3yy)
    • run install file (dmi3yy)
    • Install Evo from console: (https://monosnap.com/file/Tj21cmlMhZXNJdRXfKBLAvTlJcElkJ) (dmi3yy)
    • fix for use html tags in name (dmi3yy)
    • [F] #577 Fix "undefined index"-notice (Deesen)
    • [C] #577 TinyMCE4 code clean-up (Deesen)
    • fix (document.parser.class.inc.php) sendStrictURI (Ruslan)
    • modernize default theme (Serg)
    • Globat Tabs by Default On (dmi3yy)
    • add .tpl for create file from filemanager (dmi3yy)
    • correct getTpl (Serg)
    • add composer.json (dmi3yy)
    • fix lang error (dmi3yy)
    • update DocLister and FormLister (dmi3yy)
    • fix escapeshellarg disabled for security reason (dmi3yy)
    • Update english.inc.php (Mr B)
    • Update mainmenu.php (Mr B)
    • fix #559 Zend OPcache API is restricted by "restrict_api" configuration directive (Pathologic)
    • fix #563 Error when upgrading to 'phpmailer sender property' commit(Pathologic)
    • phpmailer sender property (Pathologic)
    • fix only variables can be passed by reference (Pathologic)
    • log only public properties of MODxMailer (Pathologic)
    Assets 2

    @dmi3yy dmi3yy released this Mar 2, 2018 · 673 commits to master since this release

    • [F] DocLister Extra install gives warning #463 (Pathologic)
    • [F] install error on PHP 7.2 (Vitaliy Rudnyh)
    • [F] #481 Fix export of Static-HTML with FURLs enabled (Deesen)
    • [F] global tabs dont work on 1.4 with manager role #484 (64j)
    • [F] Cookies mess in startCMSSession #396 (Pathologic)
    • [F] Store module unparsed placeholders (Pathologic)
    • [F] broken OnWUsrFormRender event (Pathologic)
    • [F] Fix Information tab logo path (Mr B)
    • [F] Missing hover style for TV Insert #475 (64j)
    • [F] fix for moving content to another tab (Mr B)
    • [F] Deactivated user is active after forgot password mail #42 (Pathologic)
    • [F] conflict with manager and web-user sessions #258 (Pathologic)
    • [F] #477 Cache plugin-properties using parseProperties() (Deesen)
    • [F] 1.4.0 not work params in chunks #478 (Pathologic)
    • [F] tree buttons JS (Piotr Matysiak)
    • [U] Quick Manager+ and some fix (Mr B)
    • [U] FormLister (Pathologic)
    • [U] DocLister (Agel_Nash)
    • [I] random table prefix (Agel_Nash)
    • [I] Check exists mysqi extension (Vitaliy Rudnyh)
    • [I] Outdated Extras Check (Nicola)
    • [I] ability to use extended DocumentParser class (Pathologic)
    • [I] Extras/Store - New feature "Install by file-upload" - accepts ZIP-files from https://github.com/extras-evolution/ (Deesen)
    • [I] Updated TinyMCE4 to v4.7.4 (from v4.6.3) - added param "mobile" to theme.base - added param "Skin-Theme" to settings (Deesen)
    • [R] MODxMailer - log only public properties (Pathologic)
    Assets 2
    You can’t perform that action at this time.