• Blank pages after modx update. Basic MODX settings. “Friendly URLs” section – CNC mode

    Today we will make basic settings for MODX Revo.

    Setting up MODX

    Go to the MODX admin panel (http://your_domain_name/manager/) and go to the settings panel " System Settings».

    Here you can filter settings related to a particular MODX system component, as well as settings related to the same component, but grouped into categories depending on the function performed.

    We configure the following parameters for the core.

    Allow users to use one email address - allow_multiple_emails - no

    Caching skip

    Visual editor

    Editor – which_editor – TinyMCE RTE(it should install itself if you installed it)

    Editor for elements - which_element_editor - Ace(it should also install itself if you installed it)

    File system

    Maximum upload size - upload_maxsize - 629145600 or whatever you need (I set this parameter to 600 MB to be able to upload video files).

    Friendly URLs

    Gateway we skip.

    Dictionary and language

    Language of the text editor in the frontend of the site - fe_editor_lang - ru

    Locale - locale - ru_RU.utf8

    Mail we skip.

    Control Panel

    First day of the week - manager_week_start - 1

    Monday in Russia.

    Place TV below content - tvs_below_content - Yes

    Additional custom fields for pages will be located below the main content input field. If the option is not clear now, you will figure it out later. The option is simply for the convenience of the admin interface. It's more convenient for me this way.

    Field for the name of a node in the resource tree - resource_tree_node_name - menutitle

    This is done so that the names of resources in the tree on the left are shorter.

    A tooltip field for a node in the resource tree. - resource_tree_node_tooltip - alias

    This is done so that you can understand what the resource’s address is.

    Show welcome screen - welcome_screen - no

    phpThumb, Proxy, sessions and cookies we skip.

    Website

    Do not show in menu by default - hidemenu_default - Yes

    For newly created resources (pages), the “Display in menu” checkbox will be unchecked by default. It can be turned on at any time. But why uncheck the box once again, because not all site pages created in the future will be displayed in the menu. By setting the option to “Yes”, you will not need to perform unnecessary actions in the future.

    URL scheme - link_tag_scheme - -1 (minus 1)

    Publish by default - publish_default - Yes

    The same story as with the previous option, only in reverse. When you create a page, there will already be a “Publish” checkbox. If a resource is not published, it will not be available to site visitors. But we create public pages - right?

    Site name - site_name - enter the name of the site, available for later insertion by the placeholder [[++site_name]]. Any name, for example, Construction Company LLC “Horns and Hooves”.

    Message about site unavailability - site_unavailable_message - The site is under maintenance. Please come back a little later.

    You can write whatever you want. The inscription will be displayed to everyone who visits the site during its maintenance. There is a separate option to transfer the site for maintenance.

    IN Error page 404 “Document not found” – error_page, “Site unavailable” page site_unavailable_page And Error page 403 "Access denied" unauthorized_page cost units (i.e. everything is redirected to the main page, I recommend assigning them in the settings)


    System and server

    Displaying the RSS feed “MODX News” - feed_modx_news_enabled - No

    Display the RSS feed "MODX Security Notifications" - feed_modx_security_enabled - No

    Server type - server_protocol - https(if you have an SSL certificate installed, if you don’t have it, then move on)

    Additional settings, for those from my lesson.

    Let's go to the section mixedimage and in Transliteration of files (mixedimage.translit) set Yes.

    So that pictures uploaded to resources are transliterated.

    Then we go to the section tickets and in Count page views by guests (tickets.count_guests) set Yes.

    Let's go to the section admintools and in Enable authorization via email (admintools_email_authorization) set Yes (if you work on a server, we increase security), I also usually set Theme (admintools_theme)- dark.

    This completes the initial settings. We will return to the rest of the MODX settings as needed.

    People think that security is a noun, something that can be bought. In fact, security is an abstract concept, like happiness.
    James Gosling

    The developers of MODX Revolution are constantly working to improve the security of the system they create. However, certain efforts must also be made on the part of the site creator to ensure that the security of the site remains at the proper level.

    Although no one can guarantee absolute protection, we can make it more difficult for attackers to make your life more difficult. And in this article I will talk about simple but effective ways to protect your website.

    1 Moving the core

    2 Changing the panel address

    Typically, the administrative panel of a site on MODX is located at https://site.ru/manager. Moving the admin panel helps to cover up the traces of MODX a little, and doing this is as easy as shelling pears - just rename the directory itself (for example, from manager to admin or abrakadabra), and then specify the new path in one configuration file:

    • core/config/config.inc.php

    3 Update add-ons

    Even if you are completely satisfied with the functionality of current versions of add-ons, this does not mean that there are no reasons for updates. As you know, new software versions bring with them not only new features, but also various bug fixes (although new bugs are also usually included).

    4 Update MODX

    As I wrote above, the MODX developers are constantly working to ensure the security of MODX, so it is recommended to periodically update MODX to the latest stable release.

    5 Divide and conquer

    If several people are working on the site, then it is highly recommended to configure the minimum required access rights for each user. After all, there is no point in the content manager having access to system settings or snippets with chunks.

    Even if the content manager doesn’t have the itch to tinker with the system, an attacker may appear who, taking advantage of the user’s incompetence, can intercept access to the admin area. This is especially true if you work with the site through an unsecured connection, as a result of which the login and password are transmitted over the network in clear text. To reduce the risk of password interception, it is recommended to purchase and install an SSL certificate, then all requests will be transmitted in encrypted form.

    Whether you plan to create a large information portal, an organizational website, or a simple Internet business card, after completing the MODX installation process, you will in any case need to perform basic system configuration.

    There are a huge number of settings in this control system, fewer than the stars in the sky, but enough to initially get a little confused. Let's not go to extremes. Let's consider only the basic system settings, without mentioning which the whole point of self-learning is lost...

    The first thing you need to do is get rid of the system configuration error " The kernel directory is publicly available" if such a message appears. We correct it according to the message instructions, that is, we rename the file ht.access, located in the folder core, giving it a name. htaccess.

    This can be done either through an FTP client, or through the file manager of the hosting control panel, or using the file manager of the administrative part of MODX (tab " Files" on the left side of the window).

    If you moved the core folder beyond the root directory by installing MODX using an advanced package, the third method will not help you.

    After refreshing the window, make sure that the message is gone.

    Further settings are made in the “System settings and events” window. To open the settings window, move the mouse cursor to the gear icon in the upper right corner of the admin panel and select the first item “System Settings”.

    There are a huge number of system settings in Revo

    To make it easier to find the desired setting, you can use the filter by selecting the necessary parameters by section.

    The “+” icon on the left side of the setting name will open a hint about what this item is intended for. And in the “Value” field, the parameters of each setting themselves change. Depending on the type of setting, they are entered either manually or selected from a list.

    Basic system parameters that are usually edited immediately after installing MODX

    Section "Site"

    • Site name: the name of the project we need, free form
    • Message about site unavailability: text that will be displayed when the site is disabled (sidewalled) free form
    • Publish by default: whether the new document will be available for viewing by visitors immediately after creation and saving, options of your choice Yes/No

    Section "System and Server"

    • Displaying the RSS feed “MODX News”: disable ( No)
    • Displaying the RSS feed “MODX Security Notifications”: disable ( No)

    Section "Control Panel"

    • Show tooltip text next to field: description of menu items, useful only when getting acquainted with the system, in the future you can disable options Yes/No
    • Date Format in Control Panel: can be changed to ours, native, d-m-Y
    • First day of the week: put 1 , we are not the Strugatskys

    “Friendly URLs” section – CNC mode

    • Transliteration of pseudonyms: Russian(to enable transliteration, you additionally need to install the add-on translit)
    • Container suffix: Cleaning
    • Use friendly URLs: Yes
    • Strict friendly URL mode: Yes
    • Check for duplicate URIs in all contexts: Yes

    Having enabled CNC on the site (URL friendly mode), additionally rename ht.access in the root of the site to .htaccess, otherwise, when you try to navigate to pages other than the main one, you will receive a 404 error.

    There is no need to confirm changes or save settings, everything happens automatically.

    You can additionally visit the section “ Content Types"(menu item " Content") and clear the field " File extension" in the HTML parameter. Now the page address will become without extension, that is http://site_address/about instead of http://site_address/about.html.

    Most often the problem is when white screen on modx appears after moving or changing server hosting. There is no need to be afraid, everything is corrected very easily. Next, I offer you simple instructions.

    In 99% of cases, clearing the cache folder (core/cache) helps. You can delete it, and if you are afraid, just move its contents somewhere. So, go to your hosting (ftp, file manager) to the folder with your site and delete/move contents site.ru/core/cache.


    How to clear cache folder on modx

    After that, re-open the modx admin panel. Everything should appear.

    There is another way. Go to the admin panel and select from the menu at the top Management-Clear cache.


    But it didn’t work for me - a window popped up, and the OK button did not become active. So I just deleted the contents of the folder via hosting.

    If that doesn't help, just clearing the cache

    Also, many advise changing something in the database when white modx screen does not disappear. These are the points:
    MODX News (feed_modx_news_enabled)
    MODX Security Feeds (feed_modx_security_enabled)
    Use compressed CSS (compress_css)
    Use compressed javascript libraries (compress_js)

    There are two ways to do this. The first is to go to the modx admin panel, Settings (site.ru/manager/?a=system/settings). Find them there and set the value to “no”.

    But my settings didn’t open, so I used the second method: I went to the hosting, opened phpmyadmin (database management), found the modx database, a table with settings modx_system_settings. Next, I changed the value for those 4 points above from 1 to 0. That is, for feed_modx_news_enabled, feed_modx_security_enabled, compress_css, compress_js set it to 0.



    Just in case, delete the cache in the core/cache folder again.

    No menu on modx

    I also had a problem when modx admin is loading, but there is no menu on the left. The fix is ​​very simple - we do everything described above, usually it’s enough to clear the cache (via Control - clear cache or clean the core/cache folder).

    Why does a white screen appear on modx?

    As I wrote at the beginning, a white screen appears in the modx admin when moving to another hosting. But I had another problem - the hoster changed my server, and notified about a day later. That is, my site’s IP address has changed. First I needed change A record in the domain settings (to redirect the domain to a new server), and then solve the problem with the admin panel. So, in addition to moving to another hosting, changing the server on one hosting also affects.

    Use it, like it. And then I rarely began to write something, although there is something to talk about...